blob: 813a890ae5b6d7b28ed5b28b9ab70a7ec55da41e [file] [log] [blame]
Adrian Prantl42d71b92014-04-10 23:21:53 +00001// 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//
Nico Weberbdc96982014-05-06 20:32:45 +00007// CHECK: define internal void @_GLOBAL__sub_I_globalinit_loc.cpp
Adrian Prantl0ce2b872014-04-11 23:45:01 +00008// CHECK: !dbg ![[DBG:.*]]
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +00009// CHECK: !DISubprogram(linkageName: "_GLOBAL__sub_I_globalinit_loc.cpp"
Duncan P. N. Exon Smithf04be1f2015-03-03 17:25:55 +000010// CHECK-NOT: line:
11// CHECK-SAME: isLocal: true
12// CHECK-SAME: isDefinition: true
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000013// CHECK: ![[DBG]] = !DILocation(line: 0,
Adrian Prantl42d71b92014-04-10 23:21:53 +000014# 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