1 // RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -gno-column-info -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
2 // RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -gno-column-info -triple x86_64-apple-darwin10 -std=c++98 %s -o - | FileCheck %s
3 // RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -gno-column-info -triple x86_64-apple-darwin10 -std=c++11 %s -o - | FileCheck %s
5 // Check the line numbers for cleanup code with EH in combination with
6 // simple return expressions.
8 // CHECK: define {{.*}}foo
9 // CHECK: call void @_ZN1CD1Ev(%class.C* {{.*}}){{( #[0-9])?}}, !dbg ![[RET:[0-9]+]]
10 // CHECK: ret i32 0, !dbg ![[RET]]
12 // CHECK: define {{.*}}bar
13 // CHECK: ret void, !dbg ![[RETBAR:[0-9]+]]
15 // CHECK: define {{.*}}baz
16 // CHECK: ret void, !dbg ![[RETBAZ:[0-9]+]]
29 // This breakpoint should be at/before the cleanup code.
30 // CHECK: ![[RET]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
36 // CHECK: {{.*}} = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
43 // Clang creates only a single ret instruction. Make sure it is at a useful line.
44 // CHECK: ![[RETBAR]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})
50 // CHECK: ![[SCOPE1:.*]] = distinct !DILexicalBlock({{.*}}, line: [[@LINE-1]])
51 // CHECK: {{.*}} = !DILocation(line: [[@LINE+1]], scope: ![[SCOPE1]])
56 // CHECK: {{.*}} = !DILocation(line: [[@LINE+2]], scope: ![[SCOPE2:.*]])
57 // CHECK: ![[SCOPE2]] = distinct !DILexicalBlock({{.*}}, line: [[@LINE-3]])
60 // CHECK: ![[RETBAZ]] = !DILocation(line: [[@LINE+1]], scope: !{{.*}})