[DebugInfo] Fix LineTest byteswap for cross-targeting builds
authorDavid Tenty <daltenty@ibm.com>
Thu, 2 Jul 2020 18:35:30 +0000 (14:35 -0400)
committerDavid Tenty <daltenty@ibm.com>
Thu, 2 Jul 2020 18:39:42 +0000 (14:39 -0400)
commit670dbad473270a2bd46fc611bd48472685403ed6
tree79829c2e5a3888f65d4903a540d0c604679b1ce3
parentaa7fd905e4e1bc510448431da9310e8cf5197523
[DebugInfo] Fix LineTest byteswap for cross-targeting builds

Summary:
The byte swap fix for big endian hosts in 9782c922cb21 (for D81570)
swaps based on the host endianess,  but for cross-targeting builds (i.e.
big endian host targeting little endian) the host-endianess won't
necessarily match the generated DWARF. This change updates the test
to use symmetrical constants so the results aren't endian dependent.

Reviewers: jhenderson, hubert.reinterpretcast, stevewan, ikudrin

Reviewed By: ikudrin

Subscribers: ikudrin, aprantl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82827
llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp