diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-10-01 00:56:55 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-10-01 00:56:55 +0000 |
commit | 32b0f365a2f428e4f2b92f38474d1eccf70fd7d4 (patch) | |
tree | 91c7c535d5aeb8da5af240f6ca7eac75000470a8 /llvm/test/DebugInfo/X86/nondefault-subrange-array.ll | |
parent | 05d8c8e682f02b6644789c968df67b25c89469ad (diff) | |
download | bcm5719-llvm-32b0f365a2f428e4f2b92f38474d1eccf70fd7d4.tar.gz bcm5719-llvm-32b0f365a2f428e4f2b92f38474d1eccf70fd7d4.zip |
Implement DW_TAG_subrange_type with DW_AT_count rather than DW_AT_upper_bound
This allows proper disambiguation of unbounded arrays and arrays of zero
bound ("struct foo { int x[]; };" and "struct foo { int x[0]; }"). GCC
instead produces an upper bound of -1 in the latter situation, but count
seems tidier. This way lower_bound is provided if it's not the language
default and count is provided if the count is known, otherwise it's
omitted. Simple.
If someone wants to look at rdar://problem/12566646 and see if this
change is acceptable to that bug/fix, that might be helpful (see the
empty-and-one-elem-array.ll test case which cites that radar).
llvm-svn: 218726
Diffstat (limited to 'llvm/test/DebugInfo/X86/nondefault-subrange-array.ll')
-rw-r--r-- | llvm/test/DebugInfo/X86/nondefault-subrange-array.ll | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/test/DebugInfo/X86/nondefault-subrange-array.ll b/llvm/test/DebugInfo/X86/nondefault-subrange-array.ll index 75728b5e192..dbf6cb6fecb 100644 --- a/llvm/test/DebugInfo/X86/nondefault-subrange-array.ll +++ b/llvm/test/DebugInfo/X86/nondefault-subrange-array.ll @@ -19,7 +19,7 @@ ; 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_lower_bound [DW_FORM_data8] (0xfffffffffffffffd) -; CHECK-NEXT: DW_AT_upper_bound [DW_FORM_data1] (0x26) +; CHECK-NEXT: DW_AT_count [DW_FORM_data1] (0x2a) ; CHECK: [[BASE]]: DW_TAG_base_type ; CHECK: [[BASE2]]: DW_TAG_base_type |