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