summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/ExtDebugInfo.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2016-01-20 01:29:34 +0000
committerAdrian Prantl <aprantl@apple.com>2016-01-20 01:29:34 +0000
commit8f55b66a53d8c1bb1fb9441201113af8b2a6886a (patch)
tree86c8f20c179e9f2dac61968d55d29a6b7eb5966e /clang/test/Modules/ExtDebugInfo.cpp
parent59411db5202ed5a4e680457109cdbeed217219b6 (diff)
downloadbcm5719-llvm-8f55b66a53d8c1bb1fb9441201113af8b2a6886a.tar.gz
bcm5719-llvm-8f55b66a53d8c1bb1fb9441201113af8b2a6886a.zip
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
Diffstat (limited to 'clang/test/Modules/ExtDebugInfo.cpp')
-rw-r--r--clang/test/Modules/ExtDebugInfo.cpp10
1 files changed, 9 insertions, 1 deletions
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)
OpenPOWER on IntegriCloud