summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2018-10-09 17:58:51 +0000
committerZachary Turner <zturner@google.com>2018-10-09 17:58:51 +0000
commitb7dd12b7a8ef05e7802e244f87c632fd72838f4f (patch)
tree395934d6802276a89d6b34ee8b5cad992f737d4a /llvm/lib
parentc2921f002e4cf4fdca95a4fe10a2488812699ea3 (diff)
downloadbcm5719-llvm-b7dd12b7a8ef05e7802e244f87c632fd72838f4f.tar.gz
bcm5719-llvm-b7dd12b7a8ef05e7802e244f87c632fd72838f4f.zip
[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
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/DebugInfo/PDB/Native/GlobalsStream.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/GlobalsStream.cpp b/llvm/lib/DebugInfo/PDB/Native/GlobalsStream.cpp
index 786804b3196..b03c6c3bf81 100644
--- a/llvm/lib/DebugInfo/PDB/Native/GlobalsStream.cpp
+++ b/llvm/lib/DebugInfo/PDB/Native/GlobalsStream.cpp
@@ -121,7 +121,8 @@ static Error readGSIHashRecords(FixedStreamArray<PSHashRecord> &HashRecords,
static Error
readGSIHashBuckets(FixedStreamArray<support::ulittle32_t> &HashBuckets,
- ArrayRef<uint32_t> &HashBitmap, const GSIHashHeader *HashHdr,
+ FixedStreamArray<support::ulittle32_t> &HashBitmap,
+ const GSIHashHeader *HashHdr,
MutableArrayRef<int32_t> BucketMap,
BinaryStreamReader &Reader) {
if (auto EC = checkHashHdrVersion(HashHdr))
OpenPOWER on IntegriCloud