summaryrefslogtreecommitdiffstats
path: root/test/FrontendObjC
diff options
context:
space:
mode:
Diffstat (limited to 'test/FrontendObjC')
-rw-r--r--test/FrontendObjC/2007-10-17-SJLJExceptions.m2
-rw-r--r--test/FrontendObjC/2009-04-14-AsmSection.m2
-rw-r--r--test/FrontendObjC/2009-04-27-bitfield-vs-ivar.m2
-rw-r--r--test/FrontendObjC/2009-08-05-utf16.m5
-rw-r--r--test/FrontendObjC/2009-08-17-DebugInfo.m28
5 files changed, 36 insertions, 3 deletions
diff --git a/test/FrontendObjC/2007-10-17-SJLJExceptions.m b/test/FrontendObjC/2007-10-17-SJLJExceptions.m
index 4bea6e9..970207e 100644
--- a/test/FrontendObjC/2007-10-17-SJLJExceptions.m
+++ b/test/FrontendObjC/2007-10-17-SJLJExceptions.m
@@ -1,4 +1,4 @@
-// RUN: %llvmgcc -x objective-c %s -pipe -std=gnu99 -O2 -fexceptions -S -o - | not grep Unwind_Resume
+// RUN: %llvmgcc -m32 -x objective-c %s -pipe -std=gnu99 -O2 -fexceptions -S -o - | not grep Unwind_Resume
#import <stdio.h>
@interface Foo {
diff --git a/test/FrontendObjC/2009-04-14-AsmSection.m b/test/FrontendObjC/2009-04-14-AsmSection.m
index ec5c688..de2cef0 100644
--- a/test/FrontendObjC/2009-04-14-AsmSection.m
+++ b/test/FrontendObjC/2009-04-14-AsmSection.m
@@ -1,6 +1,6 @@
// RUN: %llvmgcc -S %s -fobjc-abi-version=2 -emit-llvm -o %t
// RUN: grep {OBJC_CLASS_\\\$_A.*section.*__DATA, __objc_data.*align} %t
-// XTARGETS: darwin
+// XTARGET: darwin
@interface A
@end
diff --git a/test/FrontendObjC/2009-04-27-bitfield-vs-ivar.m b/test/FrontendObjC/2009-04-27-bitfield-vs-ivar.m
index f5a4309..cada843 100644
--- a/test/FrontendObjC/2009-04-27-bitfield-vs-ivar.m
+++ b/test/FrontendObjC/2009-04-27-bitfield-vs-ivar.m
@@ -2,7 +2,7 @@
// RUN: grep {OBJC_CLASS_RO_\\\$_I4} %t | grep {i32 0, i32 1, i32 2, i32 0}
// RUN: grep {OBJC_CLASS_RO_\\\$_I2} %t | grep {i32 0, i32 1, i32 1, i32 0}
// RUN: grep {OBJC_CLASS_RO_\\\$_I5} %t | grep {i32 0, i32 0, i32 0, i32 0}
-// XTARGETS: darwin
+// XTARGET: darwin
// Test instance variable sizing when base class ends in bitfield
@interface I3 {
diff --git a/test/FrontendObjC/2009-08-05-utf16.m b/test/FrontendObjC/2009-08-05-utf16.m
new file mode 100644
index 0000000..2964ecf
--- /dev/null
+++ b/test/FrontendObjC/2009-08-05-utf16.m
@@ -0,0 +1,5 @@
+/* RUN: %llvmgcc -w -x objective-c -S %s -o - | grep {__utf16_string_1} | grep {internal constant} | grep {12 x i8}
+ rdar://7095855 rdar://7115749 */
+
+void *P = @"iPod™";
+
diff --git a/test/FrontendObjC/2009-08-17-DebugInfo.m b/test/FrontendObjC/2009-08-17-DebugInfo.m
new file mode 100644
index 0000000..0bc4e9a
--- /dev/null
+++ b/test/FrontendObjC/2009-08-17-DebugInfo.m
@@ -0,0 +1,28 @@
+// This is a regression test on debug info to make sure that we can set a
+// breakpoint on a objective message.
+// RUN: %llvmgcc -S -O0 -g %s -o - | llvm-as | llc -o %t.s -O0
+// RUN: %compile_c %t.s -o %t.o
+// RUN: %link %t.o -o %t.exe -framework Foundation
+// RUN: echo {break randomFunc\n} > %t.in
+// RUN: gdb -q -batch -n -x %t.in %t.exe | tee %t.out | \
+// RUN: grep {Breakpoint 1 at 0x.*: file 2009-08-17-DebugInfo.m, line 21}
+// XTARGET: darwin
+@interface MyClass
+{
+ int my;
+}
++ init;
+- randomFunc;
+@end
+
+@implementation MyClass
++ init {
+}
+- randomFunc { my = 42; }
+@end
+
+int main() {
+ id o = [MyClass init];
+ [o randomFunc];
+ return 0;
+}
OpenPOWER on IntegriCloud