diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-12-04 06:21:27 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-12-04 06:21:27 +0000 |
commit | 003ec237adbabe93d5f87d8c23b4d148b4767617 (patch) | |
tree | 7cf73896ded2295e6b631c93d908ed0e6f294e79 /test/CodeGenCXX/debug-info-zero-length-arrays.cpp | |
parent | 5c5eaa83b3c1a6f393105a1f394e7ea422bfc839 (diff) |
Add a 'count' field to the DWARF subrange.
The count field is necessary because there isn't a difference between the 'lo'
and 'hi' attributes for a one-element array and a zero-element array. When the
count is '0', we know that this is a zero-element array. When it's >=1, then
it's a normal constant sized array. When it's -1, then the array is unbounded.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169219 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/debug-info-zero-length-arrays.cpp')
-rw-r--r-- | test/CodeGenCXX/debug-info-zero-length-arrays.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGenCXX/debug-info-zero-length-arrays.cpp b/test/CodeGenCXX/debug-info-zero-length-arrays.cpp new file mode 100644 index 0000000000..bfbea3739c --- /dev/null +++ b/test/CodeGenCXX/debug-info-zero-length-arrays.cpp @@ -0,0 +1,16 @@ +// RUN: %clang -fverbose-asm -g -O0 -S %s -o - | FileCheck %s +// <rdar://problem/12566646> + +class A { + int x[]; +}; +A a; + +// CHECK: Abbrev [3] 0x2d:0x3 DW_TAG_base_type +// CHECK-NEXT: DW_AT_byte_size +// CHECK-NEXT: DW_AT_encoding +// CHECK-NEXT: Abbrev [4] 0x30:0xb DW_TAG_array_type +// CHECK-NEXT: DW_AT_type +// CHECK-NEXT: Abbrev [5] 0x35:0x5 DW_TAG_subrange_type +// CHECK-NEXT: DW_AT_type +// CHECK-NEXT: End Of Children Mark |