From 269a7003bb6f9ef2e88a77d28bc12cc7c48dd787 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Tue, 10 Oct 2017 11:49:56 +0000 Subject: [PATCH] Revert "[llvm-dwarfdump] Print type names in DW_AT_type DIEs" This reverts commit r315297. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315299 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/DebugInfo/DWARF/DWARFDie.cpp | 62 ------------------- .../DebugInfo/AMDGPU/pointer-address-space.ll | 10 +-- test/DebugInfo/Generic/cross-cu-inlining.ll | 2 +- test/DebugInfo/Generic/enum-types.ll | 2 +- test/DebugInfo/Generic/member-pointers.ll | 2 +- test/DebugInfo/Generic/tu-composite.ll | 10 +-- test/DebugInfo/Generic/tu-member-pointer.ll | 2 +- test/DebugInfo/X86/default-subrange-array.ll | 2 +- test/DebugInfo/X86/empty-array.ll | 6 +- test/DebugInfo/X86/fission-cu.ll | 2 +- .../X86/nondefault-subrange-array.ll | 6 +- test/DebugInfo/X86/ref_addr_relocation.ll | 4 +- test/DebugInfo/X86/subrange-type.ll | 2 +- test/DebugInfo/dwarfdump-type-units.test | 4 +- test/Linker/Inputs/type-unique-simple2-a.ll | 4 +- test/Linker/type-unique-simple-a.ll | 4 +- test/Linker/type-unique-type-array-a.ll | 2 +- .../tools/dsymutil/X86/basic-linking-x86.test | 32 +++++----- .../X86/basic-lto-dw4-linking-x86.test | 14 ++--- .../dsymutil/X86/basic-lto-linking-x86.test | 32 +++++----- test/tools/dsymutil/X86/modules.m | 8 +-- .../dsymutil/X86/odr-member-functions.cpp | 2 +- 22 files changed, 76 insertions(+), 138 deletions(-) diff --git a/lib/DebugInfo/DWARF/DWARFDie.cpp b/lib/DebugInfo/DWARF/DWARFDie.cpp index c9410d8dcd9..d2890d6139d 100644 --- a/lib/DebugInfo/DWARF/DWARFDie.cpp +++ b/lib/DebugInfo/DWARF/DWARFDie.cpp @@ -124,64 +124,6 @@ static void dumpLocation(raw_ostream &OS, DWARFFormValue &FormValue, } } -/// Dump the name encoded in the type tag. -static void dumpTypeTagName(raw_ostream &OS, dwarf::Tag T) { - StringRef TagStr = TagString(T); - if (!TagStr.startswith("DW_TAG_") || !TagStr.endswith("_type")) - return; - OS << TagStr.substr(7, TagStr.size() - 12) << " "; -} - -/// Recursively dump the DIE type name when applicable. -static void dumpTypeName(raw_ostream &OS, const DWARFDie &Die) { - DWARFDie D = Die.getAttributeValueAsReferencedDie(DW_AT_type); - - if (!D.isValid()) - return; - - if (const char *Name = D.getName(DINameKind::LinkageName)) { - OS << Name; - return; - } - - // FIXME: We should have pretty printers per language. Currently we print - // everything as if it was C++ and fall back to the TAG type name. - const dwarf::Tag T = D.getTag(); - switch (T) { - case DW_TAG_array_type: - case DW_TAG_pointer_type: - case DW_TAG_ptr_to_member_type: - case DW_TAG_reference_type: - case DW_TAG_rvalue_reference_type: - break; - default: - dumpTypeTagName(OS, T); - } - - // Follow the DW_AT_type if possible. - dumpTypeName(OS, D); - - switch (T) { - case DW_TAG_array_type: - OS << "[]"; - break; - case DW_TAG_pointer_type: - OS << '*'; - break; - case DW_TAG_ptr_to_member_type: - OS << '*'; - break; - case DW_TAG_reference_type: - OS << '&'; - break; - case DW_TAG_rvalue_reference_type: - OS << "&&"; - break; - default: - break; - } -} - static void dumpAttribute(raw_ostream &OS, const DWARFDie &Die, uint32_t *OffsetPtr, dwarf::Attribute Attr, dwarf::Form Form, unsigned Indent, @@ -246,10 +188,6 @@ static void dumpAttribute(raw_ostream &OS, const DWARFDie &Die, if (const char *Name = Die.getAttributeValueAsReferencedDie(Attr).getName( DINameKind::LinkageName)) OS << " \"" << Name << '\"'; - } else if (Attr == DW_AT_type) { - OS << " \""; - dumpTypeName(OS, Die); - OS << '"'; } else if (Attr == DW_AT_APPLE_property_attribute) { if (Optional OptVal = formValue.getAsUnsignedConstant()) dumpApplePropertyAttribute(OS, *OptVal); diff --git a/test/DebugInfo/AMDGPU/pointer-address-space.ll b/test/DebugInfo/AMDGPU/pointer-address-space.ll index 2cb0b018371..3937ba8f880 100644 --- a/test/DebugInfo/AMDGPU/pointer-address-space.ll +++ b/test/DebugInfo/AMDGPU/pointer-address-space.ll @@ -15,27 +15,27 @@ ; CHECK: DW_AT_name {{.*}}"FuncVar0" ; CHECK-NEXT: DW_AT_decl_file ; CHECK-NEXT: DW_AT_decl_line -; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[a-f0-9]+}} => {0x[[NONE:[a-f0-9]+]]} +; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[a-f0-9]+}} => {0x[[NONE:[a-f0-9]+]]}) ; CHECK: DW_AT_name {{.*}}"FuncVar1" ; CHECK-NEXT: DW_AT_decl_file ; CHECK-NEXT: DW_AT_decl_line -; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[a-f0-9]+}} => {0x[[NONE]]} +; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[a-f0-9]+}} => {0x[[NONE]]}) ; CHECK: DW_AT_name {{.*}}"FuncVar2" ; CHECK-NEXT: DW_AT_decl_file ; CHECK-NEXT: DW_AT_decl_line -; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[a-f0-9]+}} => {0x[[LOCAL:[a-f0-9]+]]} +; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[a-f0-9]+}} => {0x[[LOCAL:[a-f0-9]+]]}) ; CHECK: DW_AT_name {{.*}}"FuncVar3" ; CHECK-NEXT: DW_AT_decl_file ; CHECK-NEXT: DW_AT_decl_line -; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[a-f0-9]+}} => {0x[[PRIVATE:[a-f0-9]+]]} +; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[a-f0-9]+}} => {0x[[PRIVATE:[a-f0-9]+]]}) ; CHECK: DW_AT_name {{.*}}"FuncVar4" ; CHECK-NEXT: DW_AT_decl_file ; CHECK-NEXT: DW_AT_decl_line -; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[a-f0-9]+}} => {0x[[NONE]]} +; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[a-f0-9]+}} => {0x[[NONE]]}) ; CHECK: 0x[[NONE]]: DW_TAG_pointer_type ; CHECK-NEXT: DW_AT_type diff --git a/test/DebugInfo/Generic/cross-cu-inlining.ll b/test/DebugInfo/Generic/cross-cu-inlining.ll index e6353901cea..7311dea82de 100644 --- a/test/DebugInfo/Generic/cross-cu-inlining.ll +++ b/test/DebugInfo/Generic/cross-cu-inlining.ll @@ -24,7 +24,7 @@ ; CHECK: DW_TAG_compile_unit ; CHECK: DW_AT_name {{.*}} "a.cpp" ; CHECK: DW_TAG_subprogram -; CHECK: DW_AT_type [DW_FORM_ref_addr] (0x00000000[[INT:[a-f0-9]+]] +; CHECK: DW_AT_type [DW_FORM_ref_addr] (0x00000000[[INT:.*]]) ; CHECK: 0x[[INLINED:[0-9a-f]*]]:{{.*}}DW_TAG_inlined_subroutine ; CHECK: DW_AT_abstract_origin {{.*}}[[ABS_FUNC:........]] "_Z4funci" ; CHECK: DW_TAG_formal_parameter diff --git a/test/DebugInfo/Generic/enum-types.ll b/test/DebugInfo/Generic/enum-types.ll index cf4f6b30bb2..f595b856814 100644 --- a/test/DebugInfo/Generic/enum-types.ll +++ b/test/DebugInfo/Generic/enum-types.ll @@ -12,7 +12,7 @@ ; CHECK: DW_TAG_subprogram ; CHECK: DW_AT_MIPS_linkage_name {{.*}} "_Z4topA2EA" ; CHECK: DW_TAG_formal_parameter -; CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x{{.*}} => {0x[[ENUM]]} +; CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x{{.*}} => {0x[[ENUM]]}) ; CHECK: DW_TAG_compile_unit ; CHECK: DW_TAG_subprogram diff --git a/test/DebugInfo/Generic/member-pointers.ll b/test/DebugInfo/Generic/member-pointers.ll index 9e04e7857c0..32e090ffc39 100644 --- a/test/DebugInfo/Generic/member-pointers.ll +++ b/test/DebugInfo/Generic/member-pointers.ll @@ -5,7 +5,7 @@ ; RUN: llvm-dwarfdump -v -debug-info %t | FileCheck %s ; CHECK: DW_TAG_ptr_to_member_type ; CHECK: DW_TAG_ptr_to_member_type -; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE:0x[0-9a-f]+]]} +; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE:0x[0-9a-f]+]]}) ; CHECK: [[TYPE]]: DW_TAG_subroutine_type ; CHECK: DW_TAG_formal_parameter ; CHECK-NEXT: DW_AT_type diff --git a/test/DebugInfo/Generic/tu-composite.ll b/test/DebugInfo/Generic/tu-composite.ll index d196e0f5f05..45e0e5894d1 100644 --- a/test/DebugInfo/Generic/tu-composite.ll +++ b/test/DebugInfo/Generic/tu-composite.ll @@ -32,21 +32,21 @@ ; CHECK-NEXT: DW_AT_name [DW_FORM_strp] {{.*}}= "virt") ; Make sure we correctly handle type of a template_type being a type identifier. ; CHECK: DW_TAG_template_type_parameter -; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE2]]} +; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE2]]}) ; CHECK-NEXT: DW_AT_name [DW_FORM_strp] {{.*}}= "T") ; Make sure we correctly handle derived-from of a typedef being a type identifier. ; CHECK: DW_TAG_typedef -; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE2]]} +; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE2]]}) ; CHECK: DW_AT_name [DW_FORM_strp] {{.*}}= "baz2") ; Make sure we correctly handle derived-from of a pointer type being a type identifier. ; CHECK: DW_TAG_pointer_type -; CHECK: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE]]} +; CHECK: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE]]}) ; CHECK: DW_TAG_typedef -; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE2]]} +; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE2]]}) ; CHECK: DW_AT_name [DW_FORM_strp] {{.*}}= "baz") ; Make sure we correctly handle derived-from of an array type being a type identifier. ; CHECK: DW_TAG_array_type -; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE2]]} +; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE2]]}) ; IR generated from clang -g with the following source: ; struct C { ; virtual void foo(); diff --git a/test/DebugInfo/Generic/tu-member-pointer.ll b/test/DebugInfo/Generic/tu-member-pointer.ll index 52a70bf3eb3..78961ca4ff0 100644 --- a/test/DebugInfo/Generic/tu-member-pointer.ll +++ b/test/DebugInfo/Generic/tu-member-pointer.ll @@ -3,7 +3,7 @@ ; RUN: %llc_dwarf -filetype=obj -O0 < %s > %t ; RUN: llvm-dwarfdump -v -debug-info %t | FileCheck %s ; CHECK: DW_TAG_ptr_to_member_type -; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE:0x[0-9a-f]+]]} +; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE:0x[0-9a-f]+]]}) ; CHECK: [[TYPE]]: DW_TAG_base_type ; IR generated from clang -g with the following source: ; struct Foo { diff --git a/test/DebugInfo/X86/default-subrange-array.ll b/test/DebugInfo/X86/default-subrange-array.ll index 1374cd88886..d0af5c7deaf 100644 --- a/test/DebugInfo/X86/default-subrange-array.ll +++ b/test/DebugInfo/X86/default-subrange-array.ll @@ -18,7 +18,7 @@ source_filename = "test/DebugInfo/X86/default-subrange-array.ll" ; CHECK: DW_TAG_class_type ; CHECK: DW_TAG_member ; CHECK-NEXT: DW_AT_name {{.*}} "x" -; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] {{.*}} => {[[ARRAY:0x[0-9a-f]+]]} +; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] {{.*}} => {[[ARRAY:0x[0-9a-f]+]]}) ; CHECK: [[ARRAY]]: DW_TAG_array_type ; CHECK-NEXT: DW_AT_type diff --git a/test/DebugInfo/X86/empty-array.ll b/test/DebugInfo/X86/empty-array.ll index 42dd475c68f..1e20616fe01 100644 --- a/test/DebugInfo/X86/empty-array.ll +++ b/test/DebugInfo/X86/empty-array.ll @@ -10,13 +10,13 @@ source_filename = "test/DebugInfo/X86/empty-array.ll" ; CHECK: DW_TAG_class_type ; CHECK: DW_TAG_member ; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]*}}] = "x") -; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[ARRAY:0x[0-9a-f]*]]} +; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[ARRAY:0x[0-9a-f]*]]}) ; CHECK: [[ARRAY]]: DW_TAG_array_type [{{.*}}] * -; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[BASETYPE:0x[0-9a-f]*]]} +; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[BASETYPE:0x[0-9a-f]*]]}) ; CHECK: DW_TAG_subrange_type -; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[BASE2:0x[0-9a-f]*]]} +; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[BASE2:0x[0-9a-f]*]]}) ; CHECK-NOT: DW_AT_upper_bound ; CHECK: [[BASETYPE]]: DW_TAG_base_type diff --git a/test/DebugInfo/X86/fission-cu.ll b/test/DebugInfo/X86/fission-cu.ll index 1551bedc981..9d88043d3a2 100644 --- a/test/DebugInfo/X86/fission-cu.ll +++ b/test/DebugInfo/X86/fission-cu.ll @@ -75,7 +75,7 @@ source_filename = "test/DebugInfo/X86/fission-cu.ll" ; CHECK: DW_AT_GNU_dwo_id [DW_FORM_data8] (0x1f1f859683d49324) ; CHECK: DW_TAG_variable ; CHECK: DW_AT_name [DW_FORM_GNU_str_index] ( indexed (00000003) string = "a") -; CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[TYPE:0x[0-9a-f]*]]} +; CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[TYPE:0x[0-9a-f]*]]}) ; CHECK: DW_AT_external [DW_FORM_flag_present] (true) ; CHECK: DW_AT_decl_file [DW_FORM_data1] (0x01) ; CHECK: DW_AT_decl_line [DW_FORM_data1] (1) diff --git a/test/DebugInfo/X86/nondefault-subrange-array.ll b/test/DebugInfo/X86/nondefault-subrange-array.ll index 93e7b940384..fd3b10b5c6a 100644 --- a/test/DebugInfo/X86/nondefault-subrange-array.ll +++ b/test/DebugInfo/X86/nondefault-subrange-array.ll @@ -12,13 +12,13 @@ source_filename = "test/DebugInfo/X86/nondefault-subrange-array.ll" ; CHECK: DW_TAG_class_type ; CHECK: DW_TAG_member ; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]*}}] = "x") -; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[ARRAY:0x[0-9a-f]*]]} +; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[ARRAY:0x[0-9a-f]*]]}) ; CHECK: [[ARRAY]]: DW_TAG_array_type [{{.*}}] * -; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[BASE:0x[0-9a-f]*]]} +; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[BASE:0x[0-9a-f]*]]}) ; CHECK: DW_TAG_subrange_type -; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[BASE2:0x[0-9a-f]*]]} +; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[BASE2:0x[0-9a-f]*]]}) ; CHECK-NEXT: DW_AT_lower_bound [DW_FORM_data8] (0xfffffffffffffffd) ; CHECK-NEXT: DW_AT_count [DW_FORM_data1] (0x2a) diff --git a/test/DebugInfo/X86/ref_addr_relocation.ll b/test/DebugInfo/X86/ref_addr_relocation.ll index ba31b2498a3..40be06236b6 100644 --- a/test/DebugInfo/X86/ref_addr_relocation.ll +++ b/test/DebugInfo/X86/ref_addr_relocation.ll @@ -57,11 +57,11 @@ ; CHECK-DWARF: 0x[[ADDR:.*]]: DW_TAG_structure_type ; CHECK-DWARF: DW_TAG_compile_unit ; CHECK-DWARF: DW_TAG_variable -; CHECK-DWARF: DW_AT_type [DW_FORM_ref_addr] {{.*}}[[ADDR]] +; CHECK-DWARF: DW_AT_type [DW_FORM_ref_addr] {{.*}}[[ADDR]]) ; CHECK-DWARF2: DW_TAG_compile_unit ; CHECK-DWARF2: DW_TAG_variable -; CHECK-DWARF2: DW_AT_type [DW_FORM_ref4] {{.*}} => {[[ADDR:.*]]} +; CHECK-DWARF2: DW_AT_type [DW_FORM_ref4] {{.*}} => {[[ADDR:.*]]}) ; CHECK-DWARF2: [[ADDR]]: DW_TAG_structure_type source_filename = "test/DebugInfo/X86/ref_addr_relocation.ll" diff --git a/test/DebugInfo/X86/subrange-type.ll b/test/DebugInfo/X86/subrange-type.ll index bef9ba1bd3f..4e5f5f10800 100644 --- a/test/DebugInfo/X86/subrange-type.ll +++ b/test/DebugInfo/X86/subrange-type.ll @@ -3,7 +3,7 @@ ; Make sure that the base type from the subrange type has a name. ; CHECK: DW_TAG_subrange_type -; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]+}} => {[[SUBTYPE:0x[0-9a-f]*]]} +; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[0-9a-f]+}} => {[[SUBTYPE:0x[0-9a-f]*]]}) ; CHECK: [[SUBTYPE]]: DW_TAG_base_type ; CHECK-NEXT: DW_AT_name diff --git a/test/DebugInfo/dwarfdump-type-units.test b/test/DebugInfo/dwarfdump-type-units.test index a8876a68afc..941b7fa586e 100644 --- a/test/DebugInfo/dwarfdump-type-units.test +++ b/test/DebugInfo/dwarfdump-type-units.test @@ -6,11 +6,11 @@ CHECK: debug_info contents: CHECK: DW_TAG_variable CHECK-NEXT: DW_AT_name {{.*}}"f" -CHECK: DW_AT_type [DW_FORM_ref_sig8] ([[FOO_SIG:0x[0-9a-f]*]] +CHECK: DW_AT_type [DW_FORM_ref_sig8] ([[FOO_SIG:0x[0-9a-f]*]]) CHECK: DW_TAG_variable CHECK-NEXT: DW_AT_name {{.*}}"b" -CHECK: DW_AT_type [DW_FORM_ref_sig8] ([[BAR_SIG:0x[0-9a-f]*]] +CHECK: DW_AT_type [DW_FORM_ref_sig8] ([[BAR_SIG:0x[0-9a-f]*]]) CHECK: debug_types contents: diff --git a/test/Linker/Inputs/type-unique-simple2-a.ll b/test/Linker/Inputs/type-unique-simple2-a.ll index 534442a51b7..0b2b1ae6b61 100644 --- a/test/Linker/Inputs/type-unique-simple2-a.ll +++ b/test/Linker/Inputs/type-unique-simple2-a.ll @@ -8,9 +8,9 @@ ; CHECK: DW_TAG_compile_unit ; CHECK: DW_TAG_formal_parameter -; CHECK: DW_AT_type [DW_FORM_ref_addr] {{.*}}[[INT]] +; CHECK: DW_AT_type [DW_FORM_ref_addr] {{.*}}[[INT]]) ; CHECK: DW_TAG_variable -; CHECK: DW_AT_type [DW_FORM_ref_addr] {{.*}}[[BASE]] +; CHECK: DW_AT_type [DW_FORM_ref_addr] {{.*}}[[BASE]]) ; Make sure llvm-link only generates a single copy of the struct. ; LINK: DW_TAG_structure_type diff --git a/test/Linker/type-unique-simple-a.ll b/test/Linker/type-unique-simple-a.ll index 20b349757f0..68b7be5896c 100644 --- a/test/Linker/type-unique-simple-a.ll +++ b/test/Linker/type-unique-simple-a.ll @@ -15,9 +15,9 @@ ; CHECK: DW_TAG_compile_unit ; CHECK: DW_TAG_formal_parameter -; CHECK: DW_AT_type [DW_FORM_ref_addr] {{.*}}[[INT]] +; CHECK: DW_AT_type [DW_FORM_ref_addr] {{.*}}[[INT]]) ; CHECK: DW_TAG_variable -; CHECK: DW_AT_type [DW_FORM_ref_addr] {{.*}}[[BASE]] +; CHECK: DW_AT_type [DW_FORM_ref_addr] {{.*}}[[BASE]]) ; Make sure llvm-link only generates a single copy of the struct. ; LINK: DW_TAG_structure_type diff --git a/test/Linker/type-unique-type-array-a.ll b/test/Linker/type-unique-type-array-a.ll index db532b7f984..f2ac66ed5f0 100644 --- a/test/Linker/type-unique-type-array-a.ll +++ b/test/Linker/type-unique-type-array-a.ll @@ -26,7 +26,7 @@ ; CHECK: DW_AT_name {{.*}} "testA" ; CHECK: DW_TAG_formal_parameter ; CHECK: DW_TAG_formal_parameter -; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{.*}} => {0x[[STRUCT:.*]]} +; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{.*}} => {0x[[STRUCT:.*]]}) ; CHECK: 0x[[STRUCT]]: DW_TAG_structure_type ; CHECK-NEXT: DW_AT_name {{.*}} "SA" diff --git a/test/tools/dsymutil/X86/basic-linking-x86.test b/test/tools/dsymutil/X86/basic-linking-x86.test index 036eac665d9..37d8be73360 100644 --- a/test/tools/dsymutil/X86/basic-linking-x86.test +++ b/test/tools/dsymutil/X86/basic-linking-x86.test @@ -26,7 +26,7 @@ CHECK: DW_AT_name ("main") CHECK: DW_AT_decl_file ("/Inputs{{[/\\]}}basic1.c") CHECK: DW_AT_decl_line (23) CHECK: DW_AT_prototyped (0x01) -CHECK: DW_AT_type (cu + 0x0063 +CHECK: DW_AT_type (cu + 0x0063) CHECK: DW_AT_external (0x01) CHECK: DW_AT_accessibility (DW_ACCESS_public) CHECK: DW_AT_low_pc (0x0000000100000ea0) @@ -36,13 +36,13 @@ CHECK: DW_TAG_formal_parameter CHECK: DW_AT_name ("argc") CHECK: DW_AT_decl_file ("/Inputs{{[/\\]}}basic1.c") CHECK: DW_AT_decl_line (23) -CHECK: DW_AT_type (cu + 0x0063 +CHECK: DW_AT_type (cu + 0x0063) CHECK: DW_AT_location (DW_OP_fbreg -8) CHECK: DW_TAG_formal_parameter CHECK: DW_AT_name ("argv") CHECK: DW_AT_decl_file ("/Inputs{{[/\\]}}basic1.c") CHECK: DW_AT_decl_line (23) -CHECK: DW_AT_type (cu + 0x006a +CHECK: DW_AT_type (cu + 0x006a) CHECK: DW_AT_location (DW_OP_fbreg -16) CHECK: NULL CHECK: DW_TAG_base_type @@ -50,11 +50,11 @@ CHECK: DW_AT_name ("int") CHECK: DW_AT_encoding (DW_ATE_signed) CHECK: DW_AT_byte_size (0x04) CHECK: DW_TAG_pointer_type -CHECK: DW_AT_type (cu + 0x006f +CHECK: DW_AT_type (cu + 0x006f) CHECK: DW_TAG_pointer_type -CHECK: DW_AT_type (cu + 0x0074 +CHECK: DW_AT_type (cu + 0x0074) CHECK: DW_TAG_const_type -CHECK: DW_AT_type (cu + 0x0079 +CHECK: DW_AT_type (cu + 0x0079) CHECK: DW_TAG_base_type CHECK: DW_AT_name ("char") CHECK: DW_AT_encoding (DW_ATE_signed_char) @@ -73,30 +73,30 @@ CHECK: DW_TAG_base_type CHECK: DW_AT_name ("int") CHECK: DW_TAG_variable CHECK: DW_AT_name ("private_int") -CHECK: DW_AT_type (cu + 0x0026 +CHECK: DW_AT_type (cu + 0x0026) CHECK: DW_AT_decl_file ("/Inputs{{[/\\]}}basic2.c") BASIC: DW_AT_location (DW_OP_addr 0x100001008) ARCHIVE: DW_AT_location (DW_OP_addr 0x100001004) CHECK: DW_TAG_variable CHECK: DW_AT_name ("baz") -CHECK: DW_AT_type (cu + 0x0026 +CHECK: DW_AT_type (cu + 0x0026) CHECK: DW_AT_decl_file ("/Inputs{{[/\\]}}basic2.c") CHECK: DW_AT_location (DW_OP_addr 0x100001000) CHECK: DW_TAG_subprogram CHECK: DW_AT_name ("foo") CHECK: DW_AT_decl_file ("/Inputs{{[/\\]}}basic2.c") -CHECK: DW_AT_type (cu + 0x0026 +CHECK: DW_AT_type (cu + 0x0026) CHECK: DW_AT_low_pc (0x0000000100000ed0) CHECK: DW_AT_high_pc (0x0000000100000f19) CHECK: DW_AT_frame_base (DW_OP_reg6 RBP) CHECK: DW_TAG_formal_parameter CHECK: DW_AT_name ("arg") -CHECK: DW_AT_type (cu + 0x0026 +CHECK: DW_AT_type (cu + 0x0026) CHECK: DW_AT_location (DW_OP_fbreg -4) CHECK: NULL CHECK: DW_TAG_subprogram CHECK: DW_AT_name ("inc") -CHECK: DW_AT_type (cu + 0x0026 +CHECK: DW_AT_type (cu + 0x0026) CHECK: DW_AT_low_pc (0x0000000100000f20) CHECK: DW_AT_high_pc (0x0000000100000f37) CHECK: DW_AT_frame_base (DW_OP_reg6 RBP) @@ -112,28 +112,28 @@ CHECK: DW_AT_comp_dir ("/Inputs") CHECK: DW_AT_low_pc (0x0000000100000f40) CHECK: DW_TAG_variable CHECK: DW_AT_name ("val") -CHECK: DW_AT_type (cu + 0x003c +CHECK: DW_AT_type (cu + 0x003c) CHECK: DW_AT_decl_file ("/Inputs{{[/\\]}}basic3.c") BASIC: DW_AT_location (DW_OP_addr 0x100001004) ARCHIVE: DW_AT_location (DW_OP_addr 0x100001008) CHECK: DW_TAG_volatile_type -CHECK: DW_AT_type (cu + 0x0041 +CHECK: DW_AT_type (cu + 0x0041) CHECK: DW_TAG_base_type CHECK: DW_AT_name ("int") CHECK: DW_TAG_subprogram CHECK: DW_AT_name ("bar") -CHECK: DW_AT_type (cu + 0x0041 +CHECK: DW_AT_type (cu + 0x0041) CHECK: DW_AT_low_pc (0x0000000100000f40) CHECK: DW_AT_high_pc (0x0000000100000f84) CHECK: DW_AT_frame_base (DW_OP_reg6 RBP) CHECK: DW_TAG_formal_parameter CHECK: DW_AT_name ("arg") -CHECK: DW_AT_type (cu + 0x0041 +CHECK: DW_AT_type (cu + 0x0041) CHECK: DW_AT_location (DW_OP_fbreg -8) CHECK: NULL CHECK: DW_TAG_subprogram CHECK: DW_AT_name ("inc") -CHECK: DW_AT_type (cu + 0x0041 +CHECK: DW_AT_type (cu + 0x0041) CHECK: DW_AT_low_pc (0x0000000100000f90) CHECK: DW_AT_high_pc (0x0000000100000fa9) CHECK: DW_AT_frame_base (DW_OP_reg6 RBP) diff --git a/test/tools/dsymutil/X86/basic-lto-dw4-linking-x86.test b/test/tools/dsymutil/X86/basic-lto-dw4-linking-x86.test index bd4784deccf..d3530d5f85b 100644 --- a/test/tools/dsymutil/X86/basic-lto-dw4-linking-x86.test +++ b/test/tools/dsymutil/X86/basic-lto-dw4-linking-x86.test @@ -20,20 +20,20 @@ CHECK: DW_AT_frame_base (DW_OP_reg6 RBP) CHECK: DW_AT_name ("main") CHECK: DW_AT_decl_file ("/Inputs{{[/\\]}}basic1.c") CHECK: DW_AT_prototyped (true) -CHECK: DW_AT_type (0x00000000000000a1 +CHECK: DW_AT_type (0x00000000000000a1) CHECK: DW_AT_external (true) CHECK: DW_TAG_formal_parameter CHECK: DW_AT_location (DW_OP_reg5 RDI, DW_OP_piece 0x4) CHECK: DW_AT_name ("argc") CHECK: DW_AT_decl_file ("/Inputs{{[/\\]}}basic1.c") -CHECK: DW_AT_type (0x00000000000000a1 +CHECK: DW_AT_type (0x00000000000000a1) CHECK: DW_TAG_formal_parameter CHECK: DW_AT_location (DW_OP_reg4 RSI) CHECK: DW_AT_name ("argv") -CHECK: DW_AT_type (cu + 0x0060 +CHECK: DW_AT_type (cu + 0x0060) CHECK: NULL CHECK: DW_TAG_pointer_type -CHECK: DW_AT_type (cu + 0x0065 +CHECK: DW_AT_type (cu + 0x0065) CHECK: DW_TAG_pointer_type CHECK: DW_TAG_const_type CHECK: DW_TAG_base_type @@ -62,7 +62,7 @@ CHECK: DW_AT_decl_file ("/Inputs{{[/\\]}}basic2.c") CHECK: DW_AT_location (DW_OP_addr 0x100001008) CHECK: DW_TAG_subprogram CHECK: DW_AT_name ("inc") -CHECK: DW_AT_type (cu + 0x002a +CHECK: DW_AT_type (cu + 0x002a) CHECK: DW_AT_inline (DW_INL_inlined) CHECK: DW_TAG_subprogram CHECK: DW_AT_low_pc (0x0000000100000f50) @@ -71,12 +71,12 @@ CHECK: DW_AT_frame_base (DW_OP_reg6 RBP) CHECK: DW_AT_name ("foo") CHECK: DW_AT_decl_file ("/Inputs{{[/\\]}}basic2.c") CHECK: DW_AT_prototyped (true) -CHECK: DW_AT_type (cu + 0x002a +CHECK: DW_AT_type (cu + 0x002a) CHECK: DW_TAG_formal_parameter CHECK: DW_AT_location (0x00000000 CHECK: 0x0000000000000000 - 0x000000000000000c: DW_OP_reg5 RDI, DW_OP_piece 0x4) CHECK: DW_AT_name ("arg") -CHECK: DW_AT_type (cu + 0x002a +CHECK: DW_AT_type (cu + 0x002a) CHECK: DW_TAG_inlined_subroutine CHECK: DW_AT_abstract_origin (cu + 0x005b "inc") CHECK: DW_AT_low_pc (0x0000000100000f61) diff --git a/test/tools/dsymutil/X86/basic-lto-linking-x86.test b/test/tools/dsymutil/X86/basic-lto-linking-x86.test index 76bc1142736..9004bbcb7df 100644 --- a/test/tools/dsymutil/X86/basic-lto-linking-x86.test +++ b/test/tools/dsymutil/X86/basic-lto-linking-x86.test @@ -19,7 +19,7 @@ CHECK: DW_AT_name ("main") CHECK: DW_AT_decl_file ("/Inputs{{[/\\]}}basic1.c") CHECK: DW_AT_decl_line (23) CHECK: DW_AT_prototyped (0x01) -CHECK: DW_AT_type (cu + 0x0063 +CHECK: DW_AT_type (cu + 0x0063) CHECK: DW_AT_external (0x01) CHECK: DW_AT_accessibility (DW_ACCESS_public) CHECK: DW_AT_low_pc (0x0000000100000f40) @@ -27,11 +27,11 @@ CHECK: DW_AT_high_pc (0x0000000100000f4b) CHECK: DW_AT_frame_base (DW_OP_reg6 RBP) CHECK: DW_TAG_formal_parameter CHECK: DW_AT_name ("argc") -CHECK: DW_AT_type (cu + 0x0063 +CHECK: DW_AT_type (cu + 0x0063) CHECK: DW_AT_location (DW_OP_reg5 RDI, DW_OP_piece 0x4) CHECK: DW_TAG_formal_parameter CHECK: DW_AT_name ("argv") -CHECK: DW_AT_type (cu + 0x006a +CHECK: DW_AT_type (cu + 0x006a) CHECK: DW_AT_location (DW_OP_reg4 RSI) CHECK: NULL CHECK: DW_TAG_base_type @@ -39,11 +39,11 @@ CHECK: DW_AT_name ("int") CHECK: DW_AT_encoding (DW_ATE_signed) CHECK: DW_AT_byte_size (0x04) CHECK: DW_TAG_pointer_type -CHECK: DW_AT_type (cu + 0x006f +CHECK: DW_AT_type (cu + 0x006f) CHECK: DW_TAG_pointer_type -CHECK: DW_AT_type (cu + 0x0074 +CHECK: DW_AT_type (cu + 0x0074) CHECK: DW_TAG_const_type -CHECK: DW_AT_type (cu + 0x0079 +CHECK: DW_AT_type (cu + 0x0079) CHECK: DW_TAG_base_type CHECK: DW_AT_name ("char") CHECK: DW_AT_encoding (DW_ATE_signed_char) @@ -60,22 +60,22 @@ CHECK: DW_AT_comp_dir ("/Inputs") CHECK: DW_AT_low_pc (0x0000000100000f50) CHECK: DW_TAG_variable CHECK: DW_AT_name ("private_int") -CHECK: DW_AT_type (0x0000000000000063 +CHECK: DW_AT_type (0x0000000000000063) CHECK: DW_AT_decl_file ("/Inputs{{[/\\]}}basic2.c") CHECK: DW_AT_location (DW_OP_addr 0x100001008) CHECK: DW_TAG_variable CHECK: DW_AT_name ("baz") -CHECK: DW_AT_type (0x0000000000000063 +CHECK: DW_AT_type (0x0000000000000063) CHECK: DW_AT_location (DW_OP_addr 0x100001000) CHECK: DW_TAG_subprogram CHECK: DW_AT_name ("foo") -CHECK: DW_AT_type (0x0000000000000063 +CHECK: DW_AT_type (0x0000000000000063) CHECK: DW_AT_low_pc (0x0000000100000f50) CHECK: DW_AT_high_pc (0x0000000100000f89) CHECK: DW_AT_frame_base (DW_OP_reg6 RBP) CHECK: DW_TAG_formal_parameter CHECK: DW_AT_name ("arg") -CHECK: DW_AT_type (0x0000000000000063 +CHECK: DW_AT_type (0x0000000000000063) CHECK: DW_AT_location (0x00000000 CHECK: 0x0000000000000000 - 0x000000000000000e: DW_OP_reg5 RDI, DW_OP_piece 0x4) CHECK: DW_TAG_inlined_subroutine @@ -86,7 +86,7 @@ CHECK: DW_AT_call_line (20) CHECK: NULL CHECK: DW_TAG_subprogram CHECK: DW_AT_name ("inc") -CHECK: DW_AT_type (0x0000000000000063 +CHECK: DW_AT_type (0x0000000000000063) CHECK: DW_AT_inline (DW_INL_inlined) CHECK: NULL @@ -100,20 +100,20 @@ CHECK: DW_AT_comp_dir ("/Inputs") CHECK: DW_AT_low_pc (0x0000000100000f90) CHECK: DW_TAG_variable CHECK: DW_AT_name ("val") -CHECK: DW_AT_type (cu + 0x003c +CHECK: DW_AT_type (cu + 0x003c) CHECK: DW_AT_decl_file ("/Inputs{{[/\\]}}basic3.c") CHECK: DW_AT_location (DW_OP_addr 0x100001004) CHECK: DW_TAG_volatile_type -CHECK: DW_AT_type (0x0000000000000063 +CHECK: DW_AT_type (0x0000000000000063) CHECK: DW_TAG_subprogram CHECK: DW_AT_name ("bar") -CHECK: DW_AT_type (0x0000000000000063 +CHECK: DW_AT_type (0x0000000000000063) CHECK: DW_AT_low_pc (0x0000000100000f90) CHECK: DW_AT_high_pc (0x0000000100000fb4) CHECK: DW_AT_frame_base (DW_OP_reg6 RBP) CHECK: DW_TAG_formal_parameter CHECK: DW_AT_name ("arg") -CHECK: DW_AT_type (0x0000000000000063 +CHECK: DW_AT_type (0x0000000000000063) CHECK: DW_AT_location (0x00000025 CHECK: 0x0000000000000000 - 0x000000000000000f: DW_OP_reg5 RDI, DW_OP_piece 0x4 CHECK: 0x0000000000000019 - 0x000000000000001d: DW_OP_reg5 RDI, DW_OP_piece 0x4) @@ -129,7 +129,7 @@ CHECK: NULL CHECK: NULL CHECK: DW_TAG_subprogram CHECK: DW_AT_name ("inc") -CHECK: DW_AT_type (0x0000000000000063 +CHECK: DW_AT_type (0x0000000000000063) CHECK: NULL CHECK: .debug_loc contents: diff --git a/test/tools/dsymutil/X86/modules.m b/test/tools/dsymutil/X86/modules.m index 37e18b75b4b..8f30d60f3e7 100644 --- a/test/tools/dsymutil/X86/modules.m +++ b/test/tools/dsymutil/X86/modules.m @@ -61,7 +61,7 @@ struct PruneMeNot; // CHECK-NOT: DW_TAG // CHECK: 0x0[[BARTD:.*]]: DW_TAG_typedef // CHECK-NOT: DW_TAG -// CHECK: DW_AT_type [DW_FORM_ref_addr] (0x{{0*}}[[BAR]] +// CHECK: DW_AT_type [DW_FORM_ref_addr] (0x{{0*}}[[BAR]]) // CHECK: DW_TAG_structure_type // CHECK-NEXT: DW_AT_name{{.*}}"S" // CHECK-NOT: DW_TAG @@ -116,7 +116,7 @@ Bar odr_violation = { 42 }; // CHECK: DW_AT_type {{.*}}{0x{{0*}}[[PTR:.*]]} // // CHECK: 0x{{0*}}[[PTR]]: DW_TAG_pointer_type -// CHECK-NEXT DW_AT_type [DW_FORM_ref_addr] {0x{{0*}}[[INTERFACE]] +// CHECK-NEXT DW_AT_type [DW_FORM_ref_addr] {0x{{0*}}[[INTERFACE]]) extern int odr_violation; @import Foo; @@ -134,9 +134,9 @@ int main(int argc, char **argv) { // CHECK: DW_AT_name {{.*}}"odr_violation.c" // CHECK: DW_TAG_variable // CHECK: DW_AT_name {{.*}}"odr_violation" -// CHECK: DW_AT_type [DW_FORM_ref4] ({{.*}}{0x{{0*}}[[BAR2:.*]]} +// CHECK: DW_AT_type [DW_FORM_ref4] ({{.*}}{0x{{0*}}[[BAR2:.*]]}) // CHECK: 0x{{0*}}[[BAR2]]: DW_TAG_typedef -// CHECK: DW_AT_type [DW_FORM_ref4] ({{.*}}{0x{{0*}}[[BAR3:.*]]} +// CHECK: DW_AT_type [DW_FORM_ref4] ({{.*}}{0x{{0*}}[[BAR3:.*]]}) // CHECK: DW_AT_name {{.*}}"Bar" // CHECK: 0x{{0*}}[[BAR3]]: DW_TAG_structure_type // CHECK-NEXT: DW_AT_name {{.*}}"Bar" diff --git a/test/tools/dsymutil/X86/odr-member-functions.cpp b/test/tools/dsymutil/X86/odr-member-functions.cpp index 25c4f2a8eca..fcb05a753b0 100644 --- a/test/tools/dsymutil/X86/odr-member-functions.cpp +++ b/test/tools/dsymutil/X86/odr-member-functions.cpp @@ -61,7 +61,7 @@ void foo() { // CHECK-NOT: DW_TAG // CHECK: DW_AT_name {{.*}}"s" // CHECK-NOT: DW_TAG -// CHECK: DW_AT_type {{.*}}[[S]] +// CHECK: DW_AT_type {{.*}}[[S]]) // CHECK: DW_TAG_inlined_subroutine // CHECK-NEXT: DW_AT_abstract_origin{{.*}}[[FOO_SUB]] // CHECK-NOT: DW_TAG -- 2.50.1