summaryrefslogtreecommitdiffstats
path: root/llvm/test/FrontendObjC
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-08-17 23:17:17 +0000
committerDevang Patel <dpatel@apple.com>2009-08-17 23:17:17 +0000
commitc6faffde6cc16d7f37665c95a6c66272fa20fbc2 (patch)
tree0cc8b3269b7f90d096d9adf2d0bc27781bc9482e /llvm/test/FrontendObjC
parentde3a06933de5b1544f26573029a4efdaf8c982d8 (diff)
downloadbcm5719-llvm-c6faffde6cc16d7f37665c95a6c66272fa20fbc2.tar.gz
bcm5719-llvm-c6faffde6cc16d7f37665c95a6c66272fa20fbc2.zip
Add prefix only if it is needed.
llvm-svn: 79289
Diffstat (limited to 'llvm/test/FrontendObjC')
-rw-r--r--llvm/test/FrontendObjC/2009-08-17-DebugInfo.m30
1 files changed, 30 insertions, 0 deletions
diff --git a/llvm/test/FrontendObjC/2009-08-17-DebugInfo.m b/llvm/test/FrontendObjC/2009-08-17-DebugInfo.m
new file mode 100644
index 00000000000..cf962384f67
--- /dev/null
+++ b/llvm/test/FrontendObjC/2009-08-17-DebugInfo.m
@@ -0,0 +1,30 @@
+// 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 -f -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 22}
+// XTARGETS: 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