summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools
diff options
context:
space:
mode:
authorFrederic Riss <friss@apple.com>2015-03-06 23:22:53 +0000
committerFrederic Riss <friss@apple.com>2015-03-06 23:22:53 +0000
commit9833de65a7cf2df5d7fc9211cc4c1ade22613e82 (patch)
treeadd967290f4230846172b7bd5be4d8123cddd58b /llvm/test/tools
parent9d441b68a345d691bb8d3ac13492fcd9f9f57e32 (diff)
downloadbcm5719-llvm-9833de65a7cf2df5d7fc9211cc4c1ade22613e82.tar.gz
bcm5719-llvm-9833de65a7cf2df5d7fc9211cc4c1ade22613e82.zip
[dsymutil] Support cloning DIE reference attributes.
Reference attributes are mainly handled by just creating DIEEntry attributes for them. There is a special case for DW_FORM_ref_addr attributes though, because the DIEEntry code needs a DwarfDebug code to emit them (and we don't have one as we do no CodeGen). In that case, just use DIEInteger attributes with the right form. llvm-svn: 231531
Diffstat (limited to 'llvm/test/tools')
-rw-r--r--llvm/test/tools/dsymutil/X86/basic-linking-x86.test16
-rw-r--r--llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test19
2 files changed, 35 insertions, 0 deletions
diff --git a/llvm/test/tools/dsymutil/X86/basic-linking-x86.test b/llvm/test/tools/dsymutil/X86/basic-linking-x86.test
index 6a9352fb6b6..e220ea64054 100644
--- a/llvm/test/tools/dsymutil/X86/basic-linking-x86.test
+++ b/llvm/test/tools/dsymutil/X86/basic-linking-x86.test
@@ -21,17 +21,20 @@ CHECK: DW_TAG_subprogram [2] *
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000051] = "main")
CHECK: DW_AT_decl_line [DW_FORM_data1] (23)
CHECK: DW_AT_prototyped [DW_FORM_flag] (0x01)
+CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0063 => {0x00000063})
CHECK: DW_AT_external [DW_FORM_flag] (0x01)
CHECK: DW_AT_accessibility [DW_FORM_data1] (DW_ACCESS_public)
CHECK: DW_AT_frame_base [DW_FORM_block1] (<0x01> 56 )
CHECK: DW_TAG_formal_parameter [3]
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000056] = "argc")
CHECK: DW_AT_decl_line [DW_FORM_data1] (23)
+CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0063 => {0x00000063})
CHECK: DW_AT_location [DW_FORM_block1] (<0x02> 91 78 )
CHECK: DW_TAG_formal_parameter [3]
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000005b] = "argv")
CHECK: DW_AT_decl_file [DW_FORM_data1] (0x01)
CHECK: DW_AT_decl_line [DW_FORM_data1] (23)
+CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x006a => {0x0000006a})
CHECK: DW_AT_location [DW_FORM_block1] (<0x02> 91 70 )
CHECK: NULL
CHECK: DW_TAG_base_type [4]
@@ -39,8 +42,11 @@ CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000060] = "int")
CHECK: DW_AT_encoding [DW_FORM_data1] (DW_ATE_signed)
CHECK: DW_AT_byte_size [DW_FORM_data1] (0x04)
CHECK: DW_TAG_pointer_type [5]
+CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x006f => {0x0000006f})
CHECK: DW_TAG_pointer_type [5]
+CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0074 => {0x00000074})
CHECK: DW_TAG_const_type [6]
+CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0079 => {0x00000079})
CHECK: DW_TAG_base_type [4]
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000064] = "char")
CHECK: DW_AT_encoding [DW_FORM_data1] (DW_ATE_signed_char)
@@ -57,17 +63,22 @@ CHECK: DW_TAG_base_type [4]
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000060] = "int")
CHECK: DW_TAG_variable [7]
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000072] = "private_int")
+CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0026 => {0x000000a7})
CHECK: DW_TAG_variable [7]
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000007e] = "baz")
+CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0026 => {0x000000a7})
CHECK: DW_TAG_subprogram [2] *
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000082] = "foo")
+CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0026 => {0x000000a7})
CHECK: DW_AT_frame_base [DW_FORM_block1] (<0x01> 56 )
CHECK: DW_TAG_formal_parameter [3]
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000086] = "arg")
+CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0026 => {0x000000a7})
CHECK: DW_AT_location [DW_FORM_block1] (<0x02> 91 7c )
CHECK: NULL
CHECK: DW_TAG_subprogram [8]
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000008a] = "inc")
+CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0026 => {0x000000a7})
CHECK: DW_AT_frame_base [DW_FORM_block1] (<0x01> 56 )
CHECK: NULL
@@ -79,18 +90,23 @@ CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000008e] = "basic3.c")
CHECK: DW_AT_comp_dir [DW_FORM_strp] ( .debug_str[0x00000049] = "/Inputs")
CHECK: DW_TAG_variable [9]
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000097] = "val")
+CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x003c => {0x00000162})
CHECK: DW_TAG_volatile_type [10]
+CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0041 => {0x00000167})
CHECK: DW_TAG_base_type [4]
CHACK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000060] = "int")
CHECK: DW_TAG_subprogram [2] *
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000009b] = "bar")
+CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0041 => {0x00000167})
CHECK: DW_AT_frame_base [DW_FORM_block1] (<0x01> 56 )
CHECK: DW_TAG_formal_parameter [3]
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000086] = "arg")
+CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0041 => {0x00000167})
CHECK: DW_AT_location [DW_FORM_block1] (<0x02> 91 78 )
CHECK: NULL
CHECK: DW_TAG_subprogram [8]
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000008a] = "inc")
+CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0041 => {0x00000167})
CHECK: DW_AT_frame_base [DW_FORM_block1] (<0x01> 56 )
CHECK: NULL
diff --git a/llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test b/llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test
index 80da767870e..07b067cef5e 100644
--- a/llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test
+++ b/llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test
@@ -15,14 +15,17 @@ CHECK: DW_TAG_subprogram [2] *
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000051] = "main")
CHECK: DW_AT_decl_line [DW_FORM_data1] (23)
CHECK: DW_AT_prototyped [DW_FORM_flag] (0x01)
+CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0063 => {0x00000063})
CHECK: DW_AT_external [DW_FORM_flag] (0x01)
CHECK: DW_AT_accessibility [DW_FORM_data1] (DW_ACCESS_public)
CHECK: DW_AT_frame_base [DW_FORM_block1] (<0x01> 56 )
CHECK: DW_TAG_formal_parameter [3]
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000056] = "argc")
+CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0063 => {0x00000063})
CHECK: DW_AT_location [DW_FORM_block1] (<0x03> 55 93 04 )
CHECK: DW_TAG_formal_parameter [3]
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000005b] = "argv")
+CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x006a => {0x0000006a})
CHECK: DW_AT_location [DW_FORM_block1] (<0x01> 54 )
CHECK: NULL
CHECK: DW_TAG_base_type [4]
@@ -30,8 +33,11 @@ CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000060] = "int")
CHECK: DW_AT_encoding [DW_FORM_data1] (DW_ATE_signed)
CHECK: DW_AT_byte_size [DW_FORM_data1] (0x04)
CHECK: DW_TAG_pointer_type [5]
+CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x006f => {0x0000006f})
CHECK: DW_TAG_pointer_type [5]
+CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0074 => {0x00000074})
CHECK: DW_TAG_const_type [6]
+CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0079 => {0x00000079})
CHECK: DW_TAG_base_type [4]
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000064] = "char")
CHECK: DW_AT_encoding [DW_FORM_data1] (DW_ATE_signed_char)
@@ -46,18 +52,24 @@ CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000069] = "basic2.c")
CHECK: DW_AT_comp_dir [DW_FORM_strp] ( .debug_str[0x00000049] = "/Inputs")
CHECK: DW_TAG_variable [7]
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000072] = "private_int")
+CHECK: DW_AT_type [DW_FORM_ref_addr] (0x0000000000000063)
CHECK: DW_TAG_variable [7]
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000007e] = "baz")
+CHECK: DW_AT_type [DW_FORM_ref_addr] (0x0000000000000063)
CHECK: DW_TAG_subprogram [8] *
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000082] = "foo")
+CHECK: DW_AT_type [DW_FORM_ref_addr] (0x0000000000000063)
CHECK: DW_AT_frame_base [DW_FORM_block1] (<0x01> 56 )
CHECK: DW_TAG_formal_parameter [9]
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000086] = "arg")
+CHECK: DW_AT_type [DW_FORM_ref_addr] (0x0000000000000063)
CHECK: DW_TAG_inlined_subroutine [10]
+CHECK: DW_AT_abstract_origin [DW_FORM_ref4] (cu + 0x00a7 => {0x00000128} "inc")
CHECK: DW_AT_call_line [DW_FORM_data1] (20)
CHECK: NULL
CHECK: DW_TAG_subprogram [11]
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000008a] = "inc")
+CHECK: DW_AT_type [DW_FORM_ref_addr] (0x0000000000000063)
CHECK: DW_AT_inline [DW_FORM_data1] (DW_INL_inlined)
CHECK: NULL
@@ -69,16 +81,23 @@ CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000008e] = "basic3.c")
CHECK: DW_AT_comp_dir [DW_FORM_strp] ( .debug_str[0x00000049] = "/Inputs")
CHECK: DW_TAG_variable [12]
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000097] = "val")
+CHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x003c => {0x00000176})
CHECK: DW_TAG_volatile_type [13]
+CHECK: DW_AT_type [DW_FORM_ref_addr] (0x0000000000000063)
CHECK: DW_TAG_subprogram [8] *
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000009b] = "bar")
+CHECK: DW_AT_type [DW_FORM_ref_addr] (0x0000000000000063)
CHECK: DW_AT_frame_base [DW_FORM_block1] (<0x01> 56 )
CHECK: DW_TAG_formal_parameter [9]
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000086] = "arg")
+CHECK: DW_AT_type [DW_FORM_ref_addr] (0x0000000000000063)
CHECK: DW_TAG_lexical_block [14] *
CHECK: DW_TAG_inlined_subroutine [15]
+CHECK: DW_AT_abstract_origin [DW_FORM_ref4] (cu + 0x009a => {0x000001d4} "inc")
+
CHECK: NULL
CHECK: NULL
CHECK: DW_TAG_subprogram [11]
CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000008a] = "inc")
+CHECK: DW_AT_type [DW_FORM_ref_addr] (0x0000000000000063)
CHECK: NULL
OpenPOWER on IntegriCloud