summaryrefslogtreecommitdiffstats
path: root/llvm/test/Bitcode
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-04-23 21:08:00 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-04-23 21:08:00 +0000
commita59d3e5af889662139b8b08f2175f12567491441 (patch)
treec91b05e3c724401c8bf6bcbf8ff3bdfd80450ef3 /llvm/test/Bitcode
parentdc88bd6e1fc483d6927604e6b2dc58f9d4d06316 (diff)
downloadbcm5719-llvm-a59d3e5af889662139b8b08f2175f12567491441.tar.gz
bcm5719-llvm-a59d3e5af889662139b8b08f2175f12567491441.zip
DebugInfo: Remove MDString-based type references
Eliminate DITypeIdentifierMap and make DITypeRef a thin wrapper around DIType*. It is no longer legal to refer to a DICompositeType by its 'identifier:', and DIBuilder no longer retains all types with an 'identifier:' automatically. Aside from the bitcode upgrade, this is mainly removing logic to resolve an MDString-based reference to an actualy DIType. The commits leading up to this have made the implicit type map in DICompileUnit's 'retainedTypes:' field superfluous. This does not remove DITypeRef, DIScopeRef, DINodeRef, and DITypeRefArray, or stop using them in DI-related metadata. Although as of this commit they aren't serving a useful purpose, there are patchces under review to reuse them for CodeView support. The tests in LLVM were updated with deref-typerefs.sh, which is attached to the thread "[RFC] Lazy-loading of debug info metadata": http://lists.llvm.org/pipermail/llvm-dev/2016-April/098318.html llvm-svn: 267296
Diffstat (limited to 'llvm/test/Bitcode')
-rw-r--r--llvm/test/Bitcode/dityperefs-3.8.ll35
-rw-r--r--llvm/test/Bitcode/dityperefs-3.8.ll.bcbin0 -> 840 bytes
2 files changed, 35 insertions, 0 deletions
diff --git a/llvm/test/Bitcode/dityperefs-3.8.ll b/llvm/test/Bitcode/dityperefs-3.8.ll
new file mode 100644
index 00000000000..4025f21f0cd
--- /dev/null
+++ b/llvm/test/Bitcode/dityperefs-3.8.ll
@@ -0,0 +1,35 @@
+; RUN: llvm-dis < %s.bc | FileCheck %s
+; RUN: verify-uselistorder %s.bc
+
+; Establish a stable order.
+!named = !{!0, !1, !2, !3, !4, !6, !7, !8, !9, !10, !11, !12}
+
+; CHECK: !0 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")
+; CHECK-NEXT: !1 = !DICompositeType(tag: DW_TAG_structure_type, name: "T1"{{.*}}, identifier: "T1")
+; CHECK-NEXT: !2 = !DICompositeType(tag: DW_TAG_structure_type, name: "T2", scope: !1{{.*}}, baseType: !1, vtableHolder: !1, identifier: "T2")
+; CHECK-NEXT: !3 = !DIDerivedType(tag: DW_TAG_member, name: "M1", scope: !1{{.*}}, baseType: !2)
+; CHECK-NEXT: !4 = !DISubroutineType(types: !5)
+; CHECK-NEXT: !5 = !{!1, !2}
+; CHECK-NEXT: !6 = !DISubprogram(scope: !1,{{.*}} containingType: !1{{[,)]}}
+; CHECK-NEXT: !7 = !DILocalVariable(name: "V1", scope: !6, type: !2)
+; CHECK-NEXT: !8 = !DIObjCProperty(name: "P1", type: !1)
+; CHECK-NEXT: !9 = !DITemplateTypeParameter(type: !1)
+; CHECK-NEXT: !10 = !DIGlobalVariable(name: "G",{{.*}} type: !1,{{.*}} variable: i32* @G1)
+; CHECK-NEXT: !11 = !DITemplateValueParameter(type: !1, value: i32* @G1)
+; CHECK-NEXT: !12 = !DIImportedEntity(tag: DW_TAG_imported_module, name: "T2", scope: !0, entity: !1)
+
+!0 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")
+!1 = !DICompositeType(tag: DW_TAG_structure_type, name: "T1", file: !0, identifier: "T1")
+!2 = !DICompositeType(tag: DW_TAG_structure_type, name: "T2", file: !0, scope: !"T1", baseType: !"T1", vtableHolder: !"T1", identifier: "T2")
+!3 = !DIDerivedType(tag: DW_TAG_member, name: "M1", file: !0, scope: !"T1", baseType: !"T2")
+!4 = !DISubroutineType(types: !5)
+!5 = !{!"T1", !"T2"}
+!6 = !DISubprogram(scope: !"T1", isDefinition: false, containingType: !"T1")
+!7 = !DILocalVariable(name: "V1", scope: !6, type: !"T2")
+!8 = !DIObjCProperty(name: "P1", type: !"T1")
+!9 = !DITemplateTypeParameter(type: !"T1")
+!10 = !DIGlobalVariable(name: "G", type: !"T1", isDefinition: false, variable: i32* @G1)
+!11 = !DITemplateValueParameter(type: !"T1", value: i32* @G1)
+!12 = !DIImportedEntity(tag: DW_TAG_imported_module, name: "T2", scope: !0, entity: !"T1")
+
+@G1 = global i32 0
diff --git a/llvm/test/Bitcode/dityperefs-3.8.ll.bc b/llvm/test/Bitcode/dityperefs-3.8.ll.bc
new file mode 100644
index 00000000000..0808389c7c5
--- /dev/null
+++ b/llvm/test/Bitcode/dityperefs-3.8.ll.bc
Binary files differ
OpenPOWER on IntegriCloud