llvm-project/clang/test/CodeGenCXX/debug-info-namespace.cpp

18 lines
716 B
C++
Raw Normal View History

// RUN: %clang -g -S -emit-llvm %s -o - | FileCheck %s
namespace A {
#line 1 "foo.cpp"
namespace B {
int i;
}
}
// CHECK: [[FILE:![0-9]*]] {{.*}}debug-info-namespace.cpp"
// CHECK: [[VAR:![0-9]*]] = {{.*}}, metadata [[NS:![0-9]*]], metadata !"i", {{.*}} ; [ DW_TAG_variable ] [i]
// CHECK: [[NS]] = {{.*}}, metadata [[FILE2:![0-9]*]], null, metadata [[CTXT:![0-9]*]], {{.*}} ; [ DW_TAG_namespace ] [B] [line 1]
// CHECK: [[CTXT]] = {{.*}}, metadata [[FILE]], null, null, {{.*}} ; [ DW_TAG_namespace ] [A] [line 3]
// CHECK: {i32 {{[0-9]+}}, metadata [[FILE2]]{{.*}} ; [ DW_TAG_file_type ] [{{.*}}foo.cpp]
// FIXME: It is confused on win32 to generate file entry when dosish filename is given.
// REQUIRES: shell