aboutsummaryrefslogtreecommitdiffstats
path: root/test/FrontendObjC
diff options
context:
space:
mode:
Diffstat (limited to 'test/FrontendObjC')
-rw-r--r--test/FrontendObjC/2010-02-11-fwritable-stringsBug.m17
-rw-r--r--test/FrontendObjC/2010-02-23-DbgInheritance.m9
2 files changed, 26 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 0000000..13e1631
--- /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!"];
+}
diff --git a/test/FrontendObjC/2010-02-23-DbgInheritance.m b/test/FrontendObjC/2010-02-23-DbgInheritance.m
new file mode 100644
index 0000000..7e1cf67
--- /dev/null
+++ b/test/FrontendObjC/2010-02-23-DbgInheritance.m
@@ -0,0 +1,9 @@
+// RUN: %llvmgcc %s -S -g -o - | grep -v DW_TAG_member
+// Interface P should not be a member of interface I in debug info.
+@interface P
+@end
+
+@interface I : P
+@end
+
+void fn(I *iptr) {}