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:  !"0x2e\00\00\00_GLOBAL__sub_I_globalinit_loc.cpp\000\00{{.*}}\000", {{.*}} ; [ DW_TAG_subprogram ] [line 0] [local] [def]
10 // CHECK: ![[DBG]] = !MDLocation(line: 0,
11 # 99 "someheader.h"
12 class A {
13 public:
14   A();
foo()15   int foo() { return 0; }
16 };
17 # 5 "main.cpp"
18 A a;
19 
f()20 int f() {
21   return a.foo();
22 }
23 
24