llvm.org GIT mirror llvm / 4b49cd2
Add prefix only if it is needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79289 91177308-0d34-0410-b5e6-96231b3b80d8 Devang Patel 11 years ago
2 changed file(s) with 33 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
104104
105105 return Result;
106106 }
107
108 Result = X.substr(0, I-X.begin());
107
108 if (NeedPrefix)
109 Result = X.substr(0, I-X.begin());
109110
110111 // Otherwise, construct the string the expensive way.
111112 for (std::string::const_iterator E = X.end(); I != E; ++I) {
0 // This is a regression test on debug info to make sure that we can set a
1 // breakpoint on a objective message.
2 // RUN: %llvmgcc -S -O0 -g %s -o - | llvm-as | llc -o %t.s -f -O0
3 // RUN: %compile_c %t.s -o %t.o
4 // RUN: %link %t.o -o %t.exe -framework Foundation
5 // RUN: echo {break randomFunc\n} > %t.in
6 // RUN: gdb -q -batch -n -x %t.in %t.exe | tee %t.out | \
7 // RUN: grep {Breakpoint 1 at 0x.*: file 2009-08-17-DebugInfo.m, line 22}
8 // XTARGETS: darwin
9 @interface MyClass
10 {
11 int my;
12 }
13 + init;
14 - randomFunc;
15 @end
16
17 @implementation MyClass
18 + init {
19 }
20 - randomFunc {
21 my = 42;
22 }
23 @end
24
25 int main() {
26 id o = [MyClass init];
27 [o randomFunc];
28 return 0;
29 }