diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-11-19 23:08:21 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-11-19 23:08:21 +0000 |
commit | 6fe6dc19f80c78ebb06a4585fa16648189d70369 (patch) | |
tree | 23cec0003fe1274bc26c972ab1e2152107da3585 /test/DebugInfo/X86/generate-odr-hash.ll | |
parent | d4010998b0f3f7ec8322dfa8dd2daded15b17f75 (diff) | |
download | llvm-6fe6dc19f80c78ebb06a4585fa16648189d70369.tar.gz llvm-6fe6dc19f80c78ebb06a4585fa16648189d70369.tar.bz2 llvm-6fe6dc19f80c78ebb06a4585fa16648189d70369.tar.xz |
DebugInfo: Partial implementation of DWARF type units.
Emit DW_TAG_type_units into the debug_info section using compile unit
headers. This is bogus/unusable by debuggers, but testable and provides
more isolated review.
Subsequent patches will include support for type unit headers and
emission into the debug_types section, as well as comdat grouping the
types based on their hash. Also the CompileUnit type will be renamed
'Unit' and relevant portions pulled out into respective CompileUnit and
TypeUnit types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195166 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/DebugInfo/X86/generate-odr-hash.ll')
-rw-r--r-- | test/DebugInfo/X86/generate-odr-hash.ll | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/test/DebugInfo/X86/generate-odr-hash.ll b/test/DebugInfo/X86/generate-odr-hash.ll index c3075f2f0d..853d4a2047 100644 --- a/test/DebugInfo/X86/generate-odr-hash.ll +++ b/test/DebugInfo/X86/generate-odr-hash.ll @@ -1,6 +1,6 @@ ; REQUIRES: object-emission -; RUN: llc %s -o %t -filetype=obj -O0 -generate-odr-hash -mtriple=x86_64-unknown-linux-gnu +; RUN: llc %s -o %t -filetype=obj -O0 -generate-type-units -generate-odr-hash -mtriple=x86_64-unknown-linux-gnu ; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s ; ; Generated from: @@ -44,9 +44,12 @@ ; wombat wom; ; 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: DW_AT_GNU_odr_signature [DW_FORM_data8] (0x200520c0d5b90eff) + +; Check that we generate a hash for fluffy and the value. +; CHECK-LABEL: DW_AT_GNU_odr_signature [DW_FORM_data8] (0x9a0124d5a0c21c52) ; CHECK: DW_TAG_namespace ; CHECK-NEXT: debug_str{{.*}}"echidna" ; CHECK: DW_TAG_namespace @@ -55,34 +58,36 @@ ; CHECK-NEXT: debug_str{{.*}}"mongoose" ; CHECK: DW_TAG_class_type ; CHECK-NEXT: debug_str{{.*}}"fluffy" -; CHECK: DW_AT_GNU_odr_signature [DW_FORM_data8] (0x9a0124d5a0c21c52) ; We emit no hash for walrus since the type is contained in an anonymous ; namespace and won't violate any ODR-ness. +; CHECK: DW_TAG_type_unit +; CHECK-NOT: NULL +; CHECK-NOT: DW_AT_GNU_odr_signature ; CHECK: DW_TAG_structure_type ; CHECK-NEXT: debug_str{{.*}}"walrus" ; CHECK-NEXT: DW_AT_byte_size ; CHECK-NEXT: DW_AT_decl_file ; CHECK-NEXT: DW_AT_decl_line -; CHECK-NOT: DW_AT_GNU_odr_signature ; CHECK: DW_TAG_subprogram + ; Check that we generate a hash for wombat and the value, but not for the ; anonymous type contained within. +; CHECK: DW_TAG_type_unit ; CHECK: DW_TAG_structure_type -; CHECK-NEXT: debug_str{{.*}}wombat -; CHECK: DW_AT_GNU_odr_signature [DW_FORM_data8] (0x685bcc220141e9d7) +; 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 +; CHECK: DW_AT_signature [DW_FORM_ref_sig8] (0x73776f130648b986) ; CHECK: DW_TAG_structure_type -; CHECK-NEXT: DW_AT_byte_size -; CHECK-NEXT: DW_AT_decl_file -; CHECK-NEXT: DW_AT_decl_line +; CHECK-NOT: DW_AT_name +; CHECK-NOT: DW_AT_GNU_odr_signature ; CHECK: DW_TAG_member ; CHECK-NEXT: debug_str{{.*}}"a" - -; Check that we don't generate a hash for baz. +; CHECK-LABEL: DW_AT_GNU_odr_signature [DW_FORM_data8] (0x685bcc220141e9d7) ; CHECK: DW_TAG_structure_type -; CHECK-NEXT: debug_str{{.*}}"baz" -; CHECK-NOT: DW_AT_GNU_odr_signature +; CHECK-NEXT: debug_str{{.*}}"wombat" %struct.bar = type { i8 } %"class.echidna::capybara::mongoose::fluffy" = type { i32, i32 } |