26 lines · cpp
1// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -dwarf-explicit-import -O0 %s -o - | FileCheck --check-prefix=IMPORT %s2// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -O0 %s -o - | FileCheck --check-prefix=NOIMPORT %s3 4namespace5{6 int a = 5;7}8int *b = &a;9 10namespace11{12 namespace {13 int a1 = 5;14 }15 int a2 = 7;16}17int *b1 = &a1;18int *b2 = &a2;19 20// IMPORT: [[NS:![0-9]+]] = !DINamespace21// IMPORT: [[CU:![0-9]+]] = distinct !DICompileUnit22// IMPORT: [[NS2:![0-9]+]] = !DINamespace23// IMPORT: !DIImportedEntity(tag: DW_TAG_imported_module, scope: [[CU]], entity: [[NS]], file: {{![0-9]+}})24// IMPORT: !DIImportedEntity(tag: DW_TAG_imported_module, scope: [[NS]], entity: [[NS2]], file: {{![0-9]+}}, line: {{[0-9]+}})25// NOIMPORT-NOT: !DIImportedEntity26