summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2016-04-26 21:58:18 +0000
committerAdrian Prantl <aprantl@apple.com>2016-04-26 21:58:18 +0000
commit88d7917970e98609943d68dc1c47712104dfcb92 (patch)
tree65589e8fd9cacfb9cff5c54a25d8b5fd2703806b /clang/test/Modules
parenta3060c1159ffb3a86daa613024ae47fd2fafcb05 (diff)
downloadbcm5719-llvm-88d7917970e98609943d68dc1c47712104dfcb92.tar.gz
bcm5719-llvm-88d7917970e98609943d68dc1c47712104dfcb92.zip
Module debugging: Use the definition to determine module-defined types.
Follow-up to r267464. Thanks to Richard Smith for pointing this out! llvm-svn: 267611
Diffstat (limited to 'clang/test/Modules')
-rw-r--r--clang/test/Modules/ExtDebugInfo.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Modules/ExtDebugInfo.cpp b/clang/test/Modules/ExtDebugInfo.cpp
index cefb21eba2a..e16d5a85f28 100644
--- a/clang/test/Modules/ExtDebugInfo.cpp
+++ b/clang/test/Modules/ExtDebugInfo.cpp
@@ -51,6 +51,10 @@ TypedefFwdDeclTemplate tdfdt;
InAnonymousNamespace anon;
+// Forward-declared in the module.
+struct PureFwdDecl { int i; };
+PureFwdDecl definedLocally;
+
void foo() {
anon.i = GlobalStruct.i = GlobalUnion.i = GlobalEnum;
}
@@ -133,6 +137,11 @@ void foo() {
// CHECK-SAME: templateParams:
// CHECK-SAME: identifier: "_ZTS15FwdDeclTemplateIiE")
+// This type is defined locally and forward-declare in the module.
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "PureFwdDecl",
+// CHECK-SAME: elements:
+// CHECK-SAME: identifier: "_ZTS11PureFwdDecl")
+
// CHECK: !DIGlobalVariable(name: "anon_enum", {{.*}}, type: ![[ANON_ENUM:[0-9]+]]
// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, scope: ![[NS]],
// CHECK-SAME: line: 16
OpenPOWER on IntegriCloud