2013-03-20 13:12:06 +08:00
|
|
|
// RUN: %clang -g -S -emit-llvm %s -o - | FileCheck %s
|
2010-10-28 07:23:58 +08:00
|
|
|
|
|
|
|
namespace A {
|
2013-03-21 03:10:57 +08:00
|
|
|
#line 1 "foo.cpp"
|
|
|
|
namespace B {
|
2013-03-20 13:12:06 +08:00
|
|
|
int i;
|
2010-10-28 07:23:58 +08:00
|
|
|
}
|
2013-03-21 03:10:57 +08:00
|
|
|
}
|
2010-10-28 07:23:58 +08:00
|
|
|
|
2013-03-21 07:57:15 +08:00
|
|
|
// CHECK: [[FILE:![0-9]*]] {{.*}}debug-info-namespace.cpp"
|
2013-03-20 13:12:06 +08:00
|
|
|
// CHECK: [[VAR:![0-9]*]] = {{.*}}, metadata [[NS:![0-9]*]], metadata !"i", {{.*}} ; [ DW_TAG_variable ] [i]
|
2013-03-27 08:08:24 +08:00
|
|
|
// 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]
|
2013-03-27 02:57:40 +08:00
|
|
|
|
|
|
|
// FIXME: It is confused on win32 to generate file entry when dosish filename is given.
|
|
|
|
// REQUIRES: shell
|