1// 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:.*]]
9// CHECK: !MDSubprogram(linkageName: "_GLOBAL__sub_I_globalinit_loc.cpp"
10// CHECK-NOT:           line:
11// CHECK-SAME:          isLocal: true
12// CHECK-SAME:          isDefinition: true
13// CHECK: ![[DBG]] = !MDLocation(line: 0,
14# 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
27