Use the 'count' attribute instead of the 'upper_bound' attribute.
authorBill Wendling <isanbard@gmail.com>
Tue, 13 Nov 2012 02:31:58 +0000 (02:31 +0000)
committerBill Wendling <isanbard@gmail.com>
Tue, 13 Nov 2012 02:31:58 +0000 (02:31 +0000)
commit2415b3b6b0c4eeb47c53cc0f908040d106b4d024
tree1889d4e85ca8e188e2acae8a3fa68e826655c63c
parentf454dfb6b5af1ff34602577b5f546c3370be315e
Use the 'count' attribute instead of the 'upper_bound' attribute.

If we have a type 'int a[1]' and a type 'int b[0]', the generated DWARF is the
same for both of them because we use the 'upper_bound' attribute. Instead use
the 'count' attrbute, which gives the correct number of elements in the array.
<rdar://problem/12566646>

llvm-svn: 167807
clang/lib/CodeGen/CGDebugInfo.cpp
clang/test/CodeGen/debug-info-zero-length-arrays.c [new file with mode: 0644]
clang/test/CodeGenCXX/debug-info-flex-member.cpp