2015-10-08 12:24:12 +08:00
|
|
|
// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
|
2014-04-11 07:21:53 +08:00
|
|
|
// rdar://problem/14985269.
|
|
|
|
//
|
|
|
|
// Verify that the global init helper function does not get associated
|
|
|
|
// with any source location.
|
|
|
|
//
|
2015-11-06 06:04:14 +08:00
|
|
|
// CHECK: define internal {{.*}}void @_GLOBAL__sub_I_globalinit_loc.cpp({{.*}} {
|
2014-04-12 07:45:01 +08:00
|
|
|
// CHECK: !dbg ![[DBG:.*]]
|
2015-04-30 00:40:08 +08:00
|
|
|
// CHECK: !DISubprogram(linkageName: "_GLOBAL__sub_I_globalinit_loc.cpp"
|
2015-03-04 01:25:55 +08:00
|
|
|
// CHECK-NOT: line:
|
2018-11-29 05:18:07 +08:00
|
|
|
// CHECK-SAME: DISPFlagLocalToUnit
|
|
|
|
// CHECK-SAME: DISPFlagDefinition
|
2015-04-30 00:40:08 +08:00
|
|
|
// CHECK: ![[DBG]] = !DILocation(line: 0,
|
2014-04-11 07:21:53 +08:00
|
|
|
# 99 "someheader.h"
|
|
|
|
class A {
|
|
|
|
public:
|
|
|
|
A();
|
|
|
|
int foo() { return 0; }
|
|
|
|
};
|
|
|
|
# 5 "main.cpp"
|
|
|
|
A a;
|
|
|
|
|
|
|
|
int f() {
|
|
|
|
return a.foo();
|
|
|
|
}
|
|
|
|
|