aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitstreamReader.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2015-04-28 23:01:24 +0000
committerAdrian Prantl <aprantl@apple.com>2015-04-28 23:01:24 +0000
commit0a4ddc180b2da65343c2a2fd5deada5aeed11a8a (patch)
tree1e99578ce35b3e85eabff10c5184009ed571f9b8 /llvm/lib/Bitcode/Reader/BitstreamReader.cpp
parent89feff3b76579abac532746cc1317c72bfd565eb (diff)
downloadllvm-0a4ddc180b2da65343c2a2fd5deada5aeed11a8a.zip
llvm-0a4ddc180b2da65343c2a2fd5deada5aeed11a8a.tar.gz
llvm-0a4ddc180b2da65343c2a2fd5deada5aeed11a8a.tar.bz2
Debug Info: Represent local anonymous unions as anonymous unions
in the debug info. This patch deletes a hack that emits the members of local anonymous unions as local variables. Besides being morally wrong, the existing representation using local variables breaks internal assumptions about the local variables' storage size. Compiling ``` void fn1() { union { int i; char c; }; i = c; } ``` with -g -O3 -verify will cause the verifier to fail after SROA splits the 32-bit storage for the "local variable" c into two pieces because the second piece is clearly outside the 8-bit range that is expected for a variable of type char. Given the choice I'd rather fix the debug representation than weaken the verifier. Debuggers generally already know how to deal with anonymous unions when they are members of C++ record types, but they may have problems finding the local anonymous struct members in the expression evaluator. rdar://problem/20730771 llvm-svn: 236059
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitstreamReader.cpp')
0 files changed, 0 insertions, 0 deletions