diff options
author | Adrian Prantl <aprantl@apple.com> | 2016-11-03 19:42:14 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2016-11-03 19:42:14 +0000 |
commit | bd87eb459de0b0be2785c191b69add3db65daa79 (patch) | |
tree | 3f1595e394f26ed27c1c3ca69f593af23bf67e8c /clang/test/CodeGenCXX/debug-info-namespace.cpp | |
parent | dbfda63695272c2d12a6a61b18b52d3961d8e1a8 (diff) | |
download | bcm5719-llvm-bd87eb459de0b0be2785c191b69add3db65daa79.tar.gz bcm5719-llvm-bd87eb459de0b0be2785c191b69add3db65daa79.zip |
Add debug info support for C++11 inline namespaces.
<rdar://problem/18616046>
llvm-svn: 285960
Diffstat (limited to 'clang/test/CodeGenCXX/debug-info-namespace.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/debug-info-namespace.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/clang/test/CodeGenCXX/debug-info-namespace.cpp b/clang/test/CodeGenCXX/debug-info-namespace.cpp index 4c534a06d1c..c75c40766a3 100644 --- a/clang/test/CodeGenCXX/debug-info-namespace.cpp +++ b/clang/test/CodeGenCXX/debug-info-namespace.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -debug-info-kind=limited -S -emit-llvm %s -o - | FileCheck %s -// RUN: %clang_cc1 -debug-info-kind=line-tables-only -S -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-GMLT %s -// RUN: %clang_cc1 -debug-info-kind=standalone -S -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-NOLIMIT %s +// RUN: %clang_cc1 -std=c++11 -debug-info-kind=limited -S -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -std=c++11 -debug-info-kind=line-tables-only -S -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-GMLT %s +// RUN: %clang_cc1 -std=c++11 -debug-info-kind=standalone -S -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-NOLIMIT %s namespace A { #line 1 "foo.cpp" @@ -49,6 +49,9 @@ using B::i; namespace B { int var_fwd = i; } +inline namespace I { +int var_i; +} } void B::func_fwd() {} @@ -63,6 +66,8 @@ void B::func_fwd() {} // CHECK: [[VAR_FWD:![0-9]+]] = distinct !DIGlobalVariable(name: "var_fwd",{{.*}} scope: [[NS]], // CHECK-SAME: line: 44 // CHECK-SAME: isDefinition: true +// CHECK: distinct !DIGlobalVariable(name: "var_i",{{.*}} scope: [[INLINE:![0-9]+]], +// CHECK: [[INLINE]] = !DINamespace(name: "I", scope: [[CTXT]], file: [[FOOCPP]], line: 46, exportSymbols: true) // CHECK: [[CU:![0-9]+]] = distinct !DICompileUnit( // CHECK-SAME: imports: [[MODULES:![0-9]*]] // CHECK: [[MODULES]] = !{[[M1:![0-9]+]], [[M2:![0-9]+]], [[M3:![0-9]+]], [[M4:![0-9]+]], [[M5:![0-9]+]], [[M6:![0-9]+]], [[M7:![0-9]+]], [[M8:![0-9]+]], [[M9:![0-9]+]], [[M10:![0-9]+]], [[M11:![0-9]+]], [[M12:![0-9]+]], [[M13:![0-9]+]], [[M14:![0-9]+]], [[M15:![0-9]+]], [[M16:![0-9]+]], [[M17:![0-9]+]]} @@ -101,7 +106,7 @@ void B::func_fwd() {} // CHECK-SAME: scope: [[NS]], file: [[FOOCPP]], line: 9 // CHECK: [[M15]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[VAR_FWD:![0-9]+]] // CHECK: [[M16]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[FUNC]], entity: [[FUNC_FWD:![0-9]+]] -// CHECK: [[FUNC_FWD]] = distinct !DISubprogram(name: "func_fwd",{{.*}} line: 47,{{.*}} isDefinition: true +// CHECK: [[FUNC_FWD]] = distinct !DISubprogram(name: "func_fwd",{{.*}} line: 50,{{.*}} isDefinition: true // CHECK: [[M17]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: [[CTXT]], entity: [[I]] // CHECK-GMLT: [[CU:![0-9]+]] = distinct !DICompileUnit( |