[PDB] Fix failure on big endian machines.
authorZachary Turner <zturner@google.com>
Tue, 9 Oct 2018 17:58:51 +0000 (17:58 +0000)
committerZachary Turner <zturner@google.com>
Tue, 9 Oct 2018 17:58:51 +0000 (17:58 +0000)
commitb7dd12b7a8ef05e7802e244f87c632fd72838f4f
tree395934d6802276a89d6b34ee8b5cad992f737d4a
parentc2921f002e4cf4fdca95a4fe10a2488812699ea3
[PDB] Fix failure on big endian machines.

We changed an ArrayRef<uint8_t> to an ArrayRef<uint32_t>, but
it needs to be an ArrayRef<support::ulittle32_t>.

We also change ArrayRef<> to FixedStreamArray<>.  Technically
an ArrayRef<> will work, but it can cause a copy in the underlying
implementation if the memory is not contiguous, and there's no
reason not to use a FixedStreamArray<>.

Thanks to nemanjai@ and thakis@ for helping me track this down
and confirm the fix.

llvm-svn: 344063
llvm/include/llvm/DebugInfo/PDB/Native/GlobalsStream.h
llvm/lib/DebugInfo/PDB/Native/GlobalsStream.cpp
llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp