From 8f55b66a53d8c1bb1fb9441201113af8b2a6886a Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Wed, 20 Jan 2016 01:29:34 +0000 Subject: Module Debugging: Fine-tune the condition that determines whether a type can be found in a module. There are externally visible anonymous types that can be found: typedef struct { } s; // I can be found via the typedef. There are anonymous internal types that can be found: namespace { struct s {}; } // I can be found by name. rdar://problem/24199640 llvm-svn: 258272 --- clang/test/Modules/ExtDebugInfo.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'clang/test/Modules/ExtDebugInfo.cpp') diff --git a/clang/test/Modules/ExtDebugInfo.cpp b/clang/test/Modules/ExtDebugInfo.cpp index 101b0f1e16b..b9eae12deda 100644 --- a/clang/test/Modules/ExtDebugInfo.cpp +++ b/clang/test/Modules/ExtDebugInfo.cpp @@ -39,8 +39,10 @@ TypedefUnion tdu; TypedefEnum tde; TypedefStruct tds; +InAnonymousNamespace anon; + void foo() { - GlobalStruct.i = GlobalUnion.i = GlobalEnum; + anon.i = GlobalStruct.i = GlobalUnion.i = GlobalEnum; } // CHECK: ![[NS:.*]] = !DINamespace(name: "DebugCXX", scope: ![[MOD:[0-9]+]], @@ -93,4 +95,10 @@ void foo() { // CHECK: ![[GLOBAL_STRUCT]] = !DICompositeType(tag: DW_TAG_structure_type, // CHECK-SAME: elements: !{{[0-9]+}}) +// CHECK: !DIGlobalVariable(name: "anon", +// CHECK-SAME: type: ![[GLOBAL_ANON:[0-9]+]] +// CHECK: ![[GLOBAL_ANON]] = !DICompositeType(tag: DW_TAG_structure_type, +// CHECK-SAME: name: "InAnonymousNamespace", {{.*}}DIFlagFwdDecl) + + // CHECK: !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !0, entity: !"_ZTSN8DebugCXX6StructE", line: 24) -- cgit v1.2.3