blob: 69ff77ae91ffada9f6d892f4079d04bf2df0d813 [file] [log] [blame]
Stephen Hines6bcf27b2014-05-29 04:14:42 -07001// RUN: %clang_cc1 -emit-llvm -g %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:.*]]
Pirama Arumuga Nainar3ea9e332015-04-08 08:57:32 -07009// CHECK: !MDSubprogram(linkageName: "_GLOBAL__sub_I_globalinit_loc.cpp"
10// CHECK-NOT: line:
11// CHECK-SAME: isLocal: true
12// CHECK-SAME: isDefinition: true
Stephen Hines0e2c34f2015-03-23 12:09:02 -070013// CHECK: ![[DBG]] = !MDLocation(line: 0,
Stephen Hines6bcf27b2014-05-29 04:14:42 -070014# 99 "someheader.h"
15class A {
16public:
17 A();
18 int foo() { return 0; }
19};
20# 5 "main.cpp"
21A a;
22
23int f() {
24 return a.foo();
25}
26