From 383f8413cf901c8ea026318b4f95ab00107fd38c Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Sat, 23 Apr 2016 21:08:27 +0000 Subject: DebugInfo: Adapt to loss of DITypeRef in LLVM r267296 LLVM stopped using MDString-based type references, and DIBuilder no longer fills 'retainedTypes:' with every DICompositeType that has an 'identifier:' field. There are just minor changes to keep the same behaviour in CFE. Leaving 'retainedTypes:' unfilled has a dramatic impact on the output order of the IR though. There are a huge number of testcase changes, which were unfortunately not really scriptable. llvm-svn: 267297 --- clang/test/Modules/ModuleDebugInfo.cpp | 37 +++++++++++++++++----------------- 1 file changed, 18 insertions(+), 19 deletions(-) (limited to 'clang/test/Modules/ModuleDebugInfo.cpp') diff --git a/clang/test/Modules/ModuleDebugInfo.cpp b/clang/test/Modules/ModuleDebugInfo.cpp index 027d086..7b1391f 100644 --- a/clang/test/Modules/ModuleDebugInfo.cpp +++ b/clang/test/Modules/ModuleDebugInfo.cpp @@ -44,23 +44,24 @@ // CHECK-SAME: ) // CHECK: !DIEnumerator(name: "e5", value: 5) +// CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "B", +// no mangled name here yet. + +// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "A" +// CHECK-SAME: identifier: "_ZTSN8DebugCXX1AIJvEEE") + // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "Struct" // CHECK-SAME: identifier: "_ZTSN8DebugCXX6StructE") -// CHECK: !DICompositeType(tag: DW_TAG_class_type, -// CHECK-SAME: name: "Template >" +// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "Template >" // CHECK-SAME: identifier: "_ZTSN8DebugCXX8TemplateIiNS_6traitsIiEEEE") -// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "A" -// CHECK-SAME: identifier: "_ZTSN8DebugCXX1AIJvEEE") +// CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "FloatInstatiation" +// no mangled name here yet. -// CHECK: !DICompositeType(tag: DW_TAG_class_type, -// CHECK-SAME: name: "Template >" +// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "Template >" // CHECK-SAME: identifier: "_ZTSN8DebugCXX8TemplateIfNS_6traitsIfEEEE") -// CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "B", -// no mangled name here yet. - // CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "FwdVirtual" // CHECK-SAME: elements: // CHECK-SAME: identifier: "_ZTS10FwdVirtual") @@ -74,16 +75,6 @@ // CHECK-NOT: name: // CHECK-SAME: identifier: "_ZTS13TypedefStruct") -// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "Derived", -// CHECK-SAME: identifier: "_ZTS7Derived") -// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "B", scope: !"_ZTS7Derived", -// CHECK-SAME: elements: ![[B_MBRS:.*]], vtableHolder: !"_ZTS1A" -// CHECK: ![[B_MBRS]] = !{{{.*}}, ![[GET_PARENT:.*]]} -// CHECK: ![[GET_PARENT]] = !DISubprogram(name: "getParent" - -// CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "FloatInstatiation" -// no mangled name here yet. - // CHECK: !DICompositeType(tag: DW_TAG_union_type, // CHECK-NOT: name: // CHECK-SAME: ) @@ -96,4 +87,12 @@ // CHECK-SAME: name: "InAnonymousNamespace", // CHECK-SAME: elements: !{{[0-9]+}}) +// CHECK: ![[A:[0-9]+]] = {{.*}}!DICompositeType(tag: DW_TAG_class_type, name: "A", +// CHECK: ![[DERIVED:[0-9]+]] = {{.*}}!DICompositeType(tag: DW_TAG_class_type, name: "Derived", +// CHECK-SAME: identifier: "_ZTS7Derived") +// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "B", scope: ![[DERIVED]], +// CHECK-SAME: elements: ![[B_MBRS:.*]], vtableHolder: ![[A]] +// CHECK: ![[B_MBRS]] = !{{{.*}}, ![[GET_PARENT:.*]]} +// CHECK: ![[GET_PARENT]] = !DISubprogram(name: "getParent" + // CHECK-NEG-NOT: !DICompositeType(tag: DW_TAG_structure_type, name: "PureForwardDecl" -- cgit v1.1