OSDN Git Service

[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)
commitdccf3ce84ae38c30b26bdbfb7584bfc5d5f28a52
tree41048bce7f53fbef271acc85407a4b78e2d5d6cb
parent81b8d4b9e2aa0f460fd2d4d45121ad915b662db3
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344063 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/DebugInfo/PDB/Native/GlobalsStream.h
lib/DebugInfo/PDB/Native/GlobalsStream.cpp
tools/llvm-pdbutil/DumpOutputStyle.cpp