blob: 115bb444cc5f91fdefabd054b9981de6707167e0 [file] [log] [blame]
Devang Patel42946a32009-08-17 23:17:17 +00001// This is a regression test on debug info to make sure that we can set a
2// breakpoint on a objective message.
Dan Gohman2d65d352009-08-25 15:38:29 +00003// RUN: %llvmgcc -S -O0 -g %s -o - | llvm-as | llc -o %t.s -O0
Devang Patel42946a32009-08-17 23:17:17 +00004// RUN: %compile_c %t.s -o %t.o
5// RUN: %link %t.o -o %t.exe -framework Foundation
6// RUN: echo {break randomFunc\n} > %t.in
7// RUN: gdb -q -batch -n -x %t.in %t.exe | tee %t.out | \
Daniel Dunbar5ca95982009-08-18 17:38:27 +00008// RUN: grep {Breakpoint 1 at 0x.*: file 2009-08-17-DebugInfo.m, line 21}
Devang Patel42946a32009-08-17 23:17:17 +00009// XTARGETS: darwin
10@interface MyClass
11{
12 int my;
13}
14+ init;
15- randomFunc;
16@end
17
18@implementation MyClass
19+ init {
20}
Daniel Dunbar5ca95982009-08-18 17:38:27 +000021- randomFunc { my = 42; }
Devang Patel42946a32009-08-17 23:17:17 +000022@end
23
24int main() {
25 id o = [MyClass init];
26 [o randomFunc];
27 return 0;
28}