1 | // RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s |
2 | // rdar://problem/14985269. |
3 | // |
4 | // Verify that the global init helper function does not get associated |
5 | // with any source location. |
6 | // |
7 | // CHECK: define internal {{.*}}void @_GLOBAL__sub_I_globalinit_loc.cpp({{.*}} { |
8 | // CHECK: !dbg ![[DBG:.*]] |
9 | // CHECK: !DISubprogram(linkageName: "_GLOBAL__sub_I_globalinit_loc.cpp" |
10 | // CHECK-NOT: line: |
11 | // CHECK-SAME: DISPFlagLocalToUnit |
12 | // CHECK-SAME: DISPFlagDefinition |
13 | // CHECK: ![[DBG]] = !DILocation(line: 0, |
14 | # 99 "someheader.h" |
15 | class A { |
16 | public: |
17 | A(); |
18 | int foo() { return 0; } |
19 | }; |
20 | # 5 "main.cpp" |
21 | A a; |
22 | |
23 | int f() { |
24 | return a.foo(); |
25 | } |
26 | |
27 | |