2014-04-11 07:21:53 +08:00
|
|
|
// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
|
|
|
|
// rdar://problem/14985269.
|
|
|
|
//
|
|
|
|
// Verify that the global init helper function does not get associated
|
|
|
|
// with any source location.
|
|
|
|
//
|
2015-06-30 01:29:50 +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:
|
|
|
|
// CHECK-SAME: isLocal: true
|
|
|
|
// CHECK-SAME: isDefinition: true
|
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();
|
|
|
|
}
|
|
|
|
|