Use the 'count' attribute instead of the 'upper_bound' attribute.
authorBill Wendling <isanbard@gmail.com>
Tue, 13 Nov 2012 02:31:47 +0000 (02:31 +0000)
committerBill Wendling <isanbard@gmail.com>
Tue, 13 Nov 2012 02:31:47 +0000 (02:31 +0000)
commitf454dfb6b5af1ff34602577b5f546c3370be315e
treeb9508ad75aee559b021e54245c9ac841df36c066
parentc24eacc85d0530d1b85850cd54af35a4f31a3d28
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: 167806
llvm/include/llvm/DIBuilder.h
llvm/include/llvm/DebugInfo.h
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/lib/VMCore/DIBuilder.cpp
llvm/test/CodeGen/X86/dbg-subrange.ll