Files
clang-p2996/clang/test/CodeGenCXX/globalinit-loc.cpp
Duncan P. N. Exon Smith 9dd4e4e63a DebugInfo: Metadata constructs now start with DI*
LLVM r236120 renamed debug info IR constructs to use a `DI` prefix, now
that the `DIDescriptor` hierarchy has been gone for about a week.  This
commit was generated using the rename-md-di-nodes.sh upgrade script
attached to PR23080, followed by running clang-format-diff.py on the
`lib/` portion of the patch.

llvm-svn: 236121
2015-04-29 16:40:08 +00:00

27 lines
635 B
C++

// 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.
//
// CHECK: define internal void @_GLOBAL__sub_I_globalinit_loc.cpp
// CHECK: !dbg ![[DBG:.*]]
// CHECK: !DISubprogram(linkageName: "_GLOBAL__sub_I_globalinit_loc.cpp"
// CHECK-NOT: line:
// CHECK-SAME: isLocal: true
// CHECK-SAME: isDefinition: true
// CHECK: ![[DBG]] = !DILocation(line: 0,
# 99 "someheader.h"
class A {
public:
A();
int foo() { return 0; }
};
# 5 "main.cpp"
A a;
int f() {
return a.foo();
}