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.
|
|
|
|
//
|
2014-05-07 04:32:45 +08:00
|
|
|
// CHECK: define internal void @_GLOBAL__sub_I_globalinit_loc.cpp
|
2014-04-12 07:45:01 +08:00
|
|
|
// CHECK: !dbg ![[DBG:.*]]
|
2014-10-03 06:15:09 +08:00
|
|
|
// CHECK: "_GLOBAL__sub_I_globalinit_loc.cpp", i32 0, {{.*}}, i32 0} ; [ DW_TAG_subprogram ] [line 0] [local] [def]
|
2014-04-12 07:45:01 +08:00
|
|
|
// CHECK: ![[DBG]] = metadata !{i32 0, i32 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();
|
|
|
|
}
|
|
|
|
|