summaryrefslogtreecommitdiff
path: root/test/DebugInfo
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-12-13 01:06:41 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-12-13 01:06:41 +0000
commitf4597a0cd46ca119ca955237b847a990b1be9358 (patch)
treecde547fdc4a8e0d35c3484182b4e5d9fd94106fd /test/DebugInfo
parent363c1ec574c8e97f3c63771ed0bafc5441c7bf56 (diff)
DebugInfo: Move type units into the debug_types section with appropriate comdat grouping and type unit headers
This commit does not complete the type units feature - there are issues around fission support (skeletal type units, pubtypes/pubnames) and hashing of some types including those containing references to types in other type units. Originally committed as r197073 and reverted in r197079. This commit originally got jumbled up with another build-breaking commit and I can't find the failures I thought this caused anymore. Recommitting to hopefully get some clean buildbot results to work from. I have a sneaking suspicion there's unstable output in the comdat group output of MCStreamer... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197197 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/DebugInfo')
-rw-r--r--test/DebugInfo/X86/c-type-units.ll2
-rw-r--r--test/DebugInfo/X86/generate-odr-hash.ll44
2 files changed, 27 insertions, 19 deletions
diff --git a/test/DebugInfo/X86/c-type-units.ll b/test/DebugInfo/X86/c-type-units.ll
index 7fbbf7a3f02..f931d514564 100644
--- a/test/DebugInfo/X86/c-type-units.ll
+++ b/test/DebugInfo/X86/c-type-units.ll
@@ -1,6 +1,6 @@
; REQUIRES: object-emission
-; RUN: llc -o - %s -filetype=obj -O0 -generate-type-units -mtriple=x86_64-unknown-linux-gnu | llvm-dwarfdump -debug-dump=info - | FileCheck %s
+; RUN: llc -o - %s -filetype=obj -O0 -generate-dwarf-pub-sections=Disable -generate-type-units -mtriple=x86_64-unknown-linux-gnu | llvm-dwarfdump -debug-dump=types - | FileCheck %s
; struct foo {
; } f;
diff --git a/test/DebugInfo/X86/generate-odr-hash.ll b/test/DebugInfo/X86/generate-odr-hash.ll
index e76d6cc148e..8272cc04f45 100644
--- a/test/DebugInfo/X86/generate-odr-hash.ll
+++ b/test/DebugInfo/X86/generate-odr-hash.ll
@@ -45,13 +45,12 @@
; CHECK-LABEL: .debug_info contents:
; CHECK: Compile Unit: length = [[CU_SIZE:[0-9a-f]+]]
-; Check that we generate a hash for bar and the value.
-; CHECK-LABEL: DW_AT_GNU_odr_signature [DW_FORM_data8] (0x200520c0d5b90eff)
-; CHECK: DW_TAG_structure_type
-; CHECK-NEXT: debug_str{{.*}}"bar"
+
+; CHECK-LABEL: .debug_types contents:
; Check that we generate a hash for fluffy and the value.
-; CHECK-LABEL: DW_AT_GNU_odr_signature [DW_FORM_data8] (0x9a0124d5a0c21c52)
+; CHECK-LABEL: type_signature = 0x139b2e1ea94afec7
+; CHECK: DW_AT_GNU_odr_signature [DW_FORM_data8] (0x9a0124d5a0c21c52)
; CHECK: DW_TAG_namespace
; CHECK-NEXT: debug_str{{.*}}"echidna"
; CHECK: DW_TAG_namespace
@@ -61,10 +60,24 @@
; CHECK: DW_TAG_class_type
; CHECK-NEXT: debug_str{{.*}}"fluffy"
-; We emit no hash for walrus since the type is contained in an anonymous
+; Check that we generate a hash for wombat and the value, but not for the
+; anonymous type contained within.
+; CHECK-LABEL: type_signature = 0x73776f130648b986
+; CHECK: DW_AT_GNU_odr_signature [DW_FORM_data8] (0x685bcc220141e9d7)
+; CHECK: DW_TAG_structure_type
+; CHECK-NEXT: debug_str{{.*}}"wombat"
+
+; Check that we generate a hash for bar and the value.
+; CHECK-LABEL: type_signature = 0x6a7ee3d400662e88
+; CHECK: DW_AT_GNU_odr_signature [DW_FORM_data8] (0x200520c0d5b90eff)
+; CHECK: DW_TAG_structure_type
+; CHECK-NEXT: debug_str{{.*}}"bar"
+
; namespace and won't violate any ODR-ness.
+; CHECK-LABEL: type_signature = 0xc0d031d6449dbca7
; CHECK: DW_TAG_type_unit
; CHECK-NOT: NULL
+; We emit no hash for walrus since the type is contained in an anonymous
; CHECK-NOT: DW_AT_GNU_odr_signature
; CHECK: DW_TAG_structure_type
; CHECK-NEXT: debug_str{{.*}}"walrus"
@@ -74,13 +87,8 @@
; CHECK: DW_TAG_subprogram
-; Check that we generate a hash for wombat and the value, but not for the
-; anonymous type contained within.
-; CHECK-LABEL: DW_AT_GNU_odr_signature [DW_FORM_data8] (0x685bcc220141e9d7)
-; CHECK: DW_TAG_structure_type
-; CHECK-NEXT: debug_str{{.*}}"wombat"
-; CHECK: DW_TAG_type_unit
-; CHECK: DW_TAG_structure_type
+; Check that we generate no ODR hash for the anonymous type nested inside 'wombat'
+; CHECK-LABEL: type_signature = 0xbf6fc40e82583d7c
; The signature for the outer 'wombat' type - this can be FileChecked once the
; type units are moved to their own section with the full type unit header
; including the signature
@@ -98,20 +106,20 @@
; CHECK-NEXT: unit_size = [[CU_SIZE]]
; CHECK-NEXT: Offset Name
; Type unit for 'bar'
-; CHECK-NEXT: unit_size = 0x0000001f
+; CHECK-NEXT: unit_size = 0x0000002b
; CHECK-NEXT: Offset Name
; CHECK-NEXT: "bar"
-; CHECK-NEXT: unit_size = 0x00000059
+; CHECK-NEXT: unit_size = 0x00000065
; CHECK-NEXT: Offset Name
; CHECK-NEXT: "int"
; CHECK-NEXT: "echidna::capybara::mongoose::fluffy"
-; CHECK-NEXT: unit_size = 0x0000002f
+; CHECK-NEXT: unit_size = 0x0000003b
; CHECK-NEXT: Offset Name
; CHECK-NEXT: "walrus"
-; CHECK-NEXT: unit_size = 0x00000036
+; CHECK-NEXT: unit_size = 0x00000042
; CHECK-NEXT: Offset Name
; CHECK-NEXT: "wombat"
-; CHECK-NEXT: unit_size = 0x0000003f
+; CHECK-NEXT: unit_size = 0x0000004b
; CHECK-NEXT: Offset Name
; CHECK-NEXT: "int"