Debug Info: Represent local anonymous unions as anonymous unions
authorAdrian Prantl <aprantl@apple.com>
Wed, 29 Apr 2015 16:52:31 +0000 (16:52 +0000)
committerAdrian Prantl <aprantl@apple.com>
Wed, 29 Apr 2015 16:52:31 +0000 (16:52 +0000)
commit00820abf0271dcbe03231b832d603ad6a1e7dc9b
treece6918965a5f7dc1e394f679839228646966a3e5
parentba6ec4b70bc49bf8b65b59f64b43df4df3fe786e
Debug Info: Represent local anonymous unions as anonymous unions
and as artificial local variables in the debug info.

This is a follow-up to r236059. We can't get rid of the local variables
entirely because the gdb buildbot depends on them, but we can mark them
as artificial while still emitting the correct debug info. As I learned
from review comments other compilers also follow this model.

A paired commit in LLVM temporarily relaxes the debug info verifier to
not check the integrity of DW_OP_bit_pieces of artificial variables.

rdar://problem/20730771

llvm-svn: 236125
clang/lib/CodeGen/CGDebugInfo.cpp
clang/test/CodeGenCXX/debug-info-anon-union-vars.cpp