DebugInfo: Hash DW_OP_convert in loclists when using Split DWARF
authorDavid Blaikie <dblaikie@gmail.com>
Wed, 5 Feb 2020 03:25:47 +0000 (19:25 -0800)
committerDavid Blaikie <dblaikie@gmail.com>
Wed, 5 Feb 2020 03:25:47 +0000 (19:25 -0800)
commitec50e10db437d935a3faee0d72fd5b80d49682ab
tree3e09af1b6e366e94358eab3ac6a89c84982211f7
parentdef55a8efdf094148151c2e281049fa5d19072c7
DebugInfo: Hash DW_OP_convert in loclists when using Split DWARF

Originally committed in: 1ced28cbe75ff81f35ac2c71e941041eb3afcd00
            Reverted in: f75301d16d444d8cb6810d679290df744bc79ec7

(reverted due to tests failing on non-linux/x86 targets, tests have since been
generalized and specialized... since Split DWARF isn't supported on non-elf
targets anyway and we have no way to run on "whatever elf target is available"
so they fail on MacOS without an explicit target triple)

This code was incorrectly emitting extra bytes into arbitrary parts of
the object file when it was meant to be hashing them to compute the DWO
ID.

Follow-up patch(es) will refactor this API somewhat to make such bugs
harder to introduce, hopefully.
llvm/lib/CodeGen/AsmPrinter/ByteStreamer.h
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/test/DebugInfo/X86/convert-loclist.ll