brintos

brintos / llvm-project-archived public Read only

0
0
Text · 650 B · fb482b6 Raw
26 lines · cpp
1// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s2//3// Verify that the global init helper function does not get associated4// with any source location.5//6// CHECK: define internal {{.*}}void @_GLOBAL__sub_I_globalinit_loc.cpp({{.*}} {7// CHECK: !dbg ![[DBG:.*]]8// CHECK: !DISubprogram(linkageName: "_GLOBAL__sub_I_globalinit_loc.cpp"9// CHECK-NOT:           line:10// CHECK-SAME:          DISPFlagLocalToUnit11// CHECK-SAME:          DISPFlagDefinition12// CHECK: ![[DBG]] = !DILocation(line: 0,13# 99 "someheader.h"14class A {15public:16  A();17  int foo() { return 0; }18};19# 5 "main.cpp"20A a;21 22int f() {23  return a.foo();24}25 26