From 86a3020e9584ca9ecad8def43b0661ff4762672e Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 12 Feb 2010 02:02:23 +0000 Subject: [PATCH] Test case for 95958. llvm-svn: 95959 --- .../2010-02-11-fwritable-stringsBug.m | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/FrontendObjC/2010-02-11-fwritable-stringsBug.m 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 00000000000..7edd9b42262 --- /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!"]; +}