summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo/X86/empty-array.ll
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-12-04 21:34:03 +0000
committerBill Wendling <isanbard@gmail.com>2012-12-04 21:34:03 +0000
commitd7767125d5b8e12db826aa7dd761a82e63ec235b (patch)
treeb53f593b8c4cc364bcbb1e7ee12ad122618cdace /llvm/test/DebugInfo/X86/empty-array.ll
parent751afdc3d1583dab43064892c90eb864cd69cd37 (diff)
downloadbcm5719-llvm-d7767125d5b8e12db826aa7dd761a82e63ec235b.tar.gz
bcm5719-llvm-d7767125d5b8e12db826aa7dd761a82e63ec235b.zip
Use the 'count' attribute to calculate the upper bound of an array.
The count attribute is more accurate with regards to the size of an array. It also obviates the upper bound attribute in the subrange. We can also better handle an unbound array by setting the count to -1 instead of the lower bound to 1 and upper bound to 0. llvm-svn: 169312
Diffstat (limited to 'llvm/test/DebugInfo/X86/empty-array.ll')
-rw-r--r--llvm/test/DebugInfo/X86/empty-array.ll3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/test/DebugInfo/X86/empty-array.ll b/llvm/test/DebugInfo/X86/empty-array.ll
index 7258af2f3d4..cd968478ab8 100644
--- a/llvm/test/DebugInfo/X86/empty-array.ll
+++ b/llvm/test/DebugInfo/X86/empty-array.ll
@@ -15,6 +15,7 @@
; CHECK: 0x00000035: DW_TAG_subrange_type [5]
; CHECK-NEXT: 0x00000036: DW_AT_type [DW_FORM_ref4] (cu + 0x002d => {0x0000002d})
+; CHECK-NOT: DW_AT_upper_bound
; CHECK: 0x00000048: DW_TAG_member [8]
; CHECK-NEXT: 0x00000049: DW_AT_name [DW_FORM_strp] ( .debug_str[0x0000003f] = "x")
@@ -35,7 +36,7 @@
!10 = metadata !{i32 786433, null, metadata !"", null, i32 0, i64 0, i64 32, i32 0, i32 0, metadata !11, metadata !12, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 0, align 32, offset 0] [from int]
!11 = metadata !{i32 786468, null, metadata !"int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed]
!12 = metadata !{metadata !13}
-!13 = metadata !{i32 786465, i64 1, i64 0, i64 -1} ; [ DW_TAG_subrange_type ] [1, 0]
+!13 = metadata !{i32 786465, i64 0, i64 -1} ; [ DW_TAG_subrange_type ] [unbound]
!14 = metadata !{i32 786478, i32 0, metadata !7, metadata !"A", metadata !"A", metadata !"", metadata !6, i32 1, metadata !15, i1 false, i1 false, i32 0, i32 0, null, i32 320, i1 false, null, null, i32 0, metadata !18, i32 1} ; [ DW_TAG_subprogram ] [line 1] [A]
!15 = metadata !{i32 786453, i32 0, metadata !"", i32 0, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !16, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
!16 = metadata !{null, metadata !17}
OpenPOWER on IntegriCloud