summaryrefslogtreecommitdiff
path: root/test/FrontendObjC/2010-02-11-fwritable-stringsBug.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/FrontendObjC/2010-02-11-fwritable-stringsBug.m')
-rw-r--r--test/FrontendObjC/2010-02-11-fwritable-stringsBug.m17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/FrontendObjC/2010-02-11-fwritable-stringsBug.m b/test/FrontendObjC/2010-02-11-fwritable-stringsBug.m
new file mode 100644
index 0000000000000..13e16312cf66d
--- /dev/null
+++ b/test/FrontendObjC/2010-02-11-fwritable-stringsBug.m
@@ -0,0 +1,17 @@
+// RUN: %llvmgcc -x objective-c -fwritable-strings -S %s -o - | FileCheck %s
+// CHECK: @.str = private constant
+// CHECK: @.str1 = internal global
+
+// rdar://7634471
+
+@class NSString;
+
+@interface A
+- (void)foo:(NSString*)msg;
+- (void)bar:(const char*)msg;
+@end
+
+void func(A *a) {
+ [a foo:@"Hello world!"];
+ [a bar:"Goodbye world!"];
+}