summaryrefslogtreecommitdiff
path: root/test/DebugInfo
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2013-10-29 00:58:04 +0000
committerManman Ren <manman.ren@gmail.com>2013-10-29 00:58:04 +0000
commitbbdd02cc303d0f38f7739b64f419d645ca17b533 (patch)
treeca555cce9d2cf9433d337eded22ab6467f726ac7 /test/DebugInfo
parent1a5e787f701c45ac2487d400faf6f6d4def6dcef (diff)
downloadllvm-bbdd02cc303d0f38f7739b64f419d645ca17b533.tar.gz
llvm-bbdd02cc303d0f38f7739b64f419d645ca17b533.tar.bz2
llvm-bbdd02cc303d0f38f7739b64f419d645ca17b533.tar.xz
Debug Info: use createAndAddDIE for newly-created Subprogram DIEs.
More patches will be submitted to convert "new DIE(" to use createAddAndDIE in DwarfCompileUnit.cpp. This will simplify implementation of addDIEEntry where we have to decide between ref4 and ref_addr, because DIEs that can be shared across CU will be added to a CU already. Reviewed off-list by Eric. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193567 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/DebugInfo')
-rw-r--r--test/DebugInfo/X86/DW_AT_object_pointer.ll2
-rw-r--r--test/DebugInfo/X86/DW_AT_specification.ll6
-rw-r--r--test/DebugInfo/X86/elf-names.ll13
-rw-r--r--test/DebugInfo/X86/pr11300.ll7
-rw-r--r--test/DebugInfo/X86/template.ll8
5 files changed, 22 insertions, 14 deletions
diff --git a/test/DebugInfo/X86/DW_AT_object_pointer.ll b/test/DebugInfo/X86/DW_AT_object_pointer.ll
index 2bfc4c5004..f7533d49f8 100644
--- a/test/DebugInfo/X86/DW_AT_object_pointer.ll
+++ b/test/DebugInfo/X86/DW_AT_object_pointer.ll
@@ -6,7 +6,7 @@
; CHECK: DW_TAG
; CHECK: DW_TAG_class_type
; CHECK: DW_AT_object_pointer [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[PARAM:0x[0-9a-f]*]]})
-; CHECK: [[PARAM]]: DW_TAG_formal_parameter [13]
+; CHECK: [[PARAM]]: DW_TAG_formal_parameter
; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]*}}] = "this")
%class.A = type { i32 }
diff --git a/test/DebugInfo/X86/DW_AT_specification.ll b/test/DebugInfo/X86/DW_AT_specification.ll
index f36e8ee933..301a970f86 100644
--- a/test/DebugInfo/X86/DW_AT_specification.ll
+++ b/test/DebugInfo/X86/DW_AT_specification.ll
@@ -3,8 +3,10 @@
; test that the DW_AT_specification is a back edge in the file.
-; CHECK: 0x0000[[OFFSET:[0-9a-f]*]]: DW_TAG_subprogram [7] *
-; CHECK: DW_AT_specification [DW_FORM_ref4] (cu + 0x[[OFFSET]] => {0x0000[[OFFSET]]})
+; CHECK: DW_TAG_subprogram [{{[0-9]+}}] *
+; CHECK: DW_AT_specification [DW_FORM_ref4] (cu + 0x[[OFFSET:[0-9a-f]*]] => {0x0000[[OFFSET]]})
+; CHECK: 0x0000[[OFFSET]]: DW_TAG_subprogram [{{[0-9]+}}] *
+; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]*}}] = "bar")
@_ZZN3foo3barEvE1x = constant i32 0, align 4
diff --git a/test/DebugInfo/X86/elf-names.ll b/test/DebugInfo/X86/elf-names.ll
index b85f5fb84b..96538150f6 100644
--- a/test/DebugInfo/X86/elf-names.ll
+++ b/test/DebugInfo/X86/elf-names.ll
@@ -4,11 +4,14 @@
; CHECK: 0x0000000b: DW_TAG_compile_unit
; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000035] = "foo.cpp")
-; CHECK: 0x0000003c: DW_TAG_class_type
-; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000006d] = "D")
-; CHECK: 0x00000044: DW_TAG_member
-; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000005d] = "c1")
-; CHECK: DW_AT_artificial [DW_FORM_flag_present] (true)
+; CHECK: 0x{{[0-9a-f]+}}: DW_TAG_class_type
+; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]+}}] = "D")
+; CHECK: 0x{{[0-9a-f]+}}: DW_TAG_member
+; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]+}}] = "c1")
+; CHECK: DW_TAG_subprogram
+; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]+}}] = "D")
+; CHECK: DW_TAG_formal_parameter
+; CHECK: DW_AT_artificial [DW_FORM_flag_present] (true)
; CHECK-DIS: [artificial]
diff --git a/test/DebugInfo/X86/pr11300.ll b/test/DebugInfo/X86/pr11300.ll
index cdd5a743d3..e2ccf6848f 100644
--- a/test/DebugInfo/X86/pr11300.ll
+++ b/test/DebugInfo/X86/pr11300.ll
@@ -3,8 +3,11 @@
; test that the DW_AT_specification is a back edge in the file.
-; CHECK: [[BACK:0x[0-9a-f]*]]: DW_TAG_subprogram [6]
-; CHECK: DW_AT_specification [DW_FORM_ref4] (cu + {{.*}} => {[[BACK]]})
+; CHECK: DW_TAG_subprogram
+; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]*}}] = "zed")
+; CHECK: DW_TAG_subprogram
+; CHECK-NEXT: DW_AT_specification [DW_FORM_ref4] (cu + {{.*}} => {[[BACK:0x[0-9a-f]*]]})
+; CHECK: [[BACK]]: DW_TAG_subprogram
%struct.foo = type { i8 }
diff --git a/test/DebugInfo/X86/template.ll b/test/DebugInfo/X86/template.ll
index 2cf52e3460..606d8b4cc1 100644
--- a/test/DebugInfo/X86/template.ll
+++ b/test/DebugInfo/X86/template.ll
@@ -17,9 +17,6 @@
; CHECK-NOT: NULL
; CHECK: DW_TAG_template_type_parameter
-; CHECK: [[INTPTR:0x[0-9a-f]*]]:{{ *}}DW_TAG_pointer_type
-; CHECK-NEXT: DW_AT_type{{.*}} => {[[INT]]}
-
; CHECK: DW_AT_name{{.*}}"func<3, &glbl, y_impl, 1, 2>"
; CHECK-NOT: NULL
; CHECK: DW_TAG_template_value_parameter
@@ -33,7 +30,7 @@
; CHECK-NEXT: DW_AT_const_value [DW_FORM_sdata]{{.*}}(3)
; CHECK: DW_TAG_template_value_parameter
-; CHECK-NEXT: DW_AT_type{{.*}}=> {[[INTPTR]]}
+; CHECK-NEXT: DW_AT_type{{.*}}=> {[[INTPTR:0x[0-9a-f]*]]}
; The address of the global 'glbl', followed by DW_OP_stack_value (9f), to use
; the value immediately, rather than indirecting through the address.
@@ -56,6 +53,9 @@
; CHECK-NEXT: DW_AT_type{{.*}}=> {[[INT]]}
; CHECK-NEXT: DW_AT_const_value [DW_FORM_sdata]{{.*}}(2)
+; CHECK: [[INTPTR]]:{{ *}}DW_TAG_pointer_type
+; CHECK-NEXT: DW_AT_type{{.*}} => {[[INT]]}
+
%"struct.y_impl<int>::nested" = type { i8 }
@glbl = global i32 0, align 4