summaryrefslogtreecommitdiff
path: root/test/FrontendObjC
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-02-12 02:02:23 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-02-12 02:02:23 +0000
commite79562dce009b2815d4378378394f18476fd4761 (patch)
treec5a37bde3cd1da22841e8a015e91dfc4eb22dcbc /test/FrontendObjC
parentc96f6d606fb243f36046767b7a2c6a0dedffb139 (diff)
downloadllvm-e79562dce009b2815d4378378394f18476fd4761.tar.gz
llvm-e79562dce009b2815d4378378394f18476fd4761.tar.bz2
llvm-e79562dce009b2815d4378378394f18476fd4761.tar.xz
Test case for 95958.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95959 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FrontendObjC')
-rw-r--r--test/FrontendObjC/2010-02-11-fwritable-stringsBug.m18
1 files changed, 18 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 0000000000..7edd9b4226
--- /dev/null
+++ b/test/FrontendObjC/2010-02-11-fwritable-stringsBug.m
@@ -0,0 +1,18 @@
+// RUN: %llvmgcc -x objective-c -fwritable-strings -S %s -o - | FileCheck %s
+// CHECK: @.str = private constant
+// CHECK: @.str1 = private global
+// .str1 should have linker_private linkage. It will be fixed next.
+
+// 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!"];
+}