1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

Revert "[llvm-dwarfdump] Print type names in DW_AT_type DIEs"

This reverts commit r315297.

llvm-svn: 315299
This commit is contained in:
Jonas Devlieghere 2017-10-10 11:49:56 +00:00
parent 8126b68ab8
commit 0333c4b70c
22 changed files with 76 additions and 138 deletions

View File

@ -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<uint64_t> OptVal = formValue.getAsUnsignedConstant())
dumpApplePropertyAttribute(OS, *OptVal);

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -32,21 +32,21 @@
; CHECK-NEXT: DW_AT_name [DW_FORM_strp] {{.*}}= "virt<bar>")
; 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();

View File

@ -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 {

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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"

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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)

View File

@ -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)

View File

@ -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:

View File

@ -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"

View File

@ -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