[llvm] r269898 - Attempt to fix pdbdump-headers.test on big-endian hosts after r269861.
Daniel Sanders via llvm-commits
llvm-commits at lists.llvm.org
Wed May 18 02:59:15 PDT 2016
Author: dsanders
Date: Wed May 18 04:59:14 2016
New Revision: 269898
URL: http://llvm.org/viewvc/llvm-project?rev=269898&view=rev
Log:
Attempt to fix pdbdump-headers.test on big-endian hosts after r269861.
Modified:
llvm/trunk/lib/DebugInfo/PDB/Raw/PublicsStream.cpp
Modified: llvm/trunk/lib/DebugInfo/PDB/Raw/PublicsStream.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Raw/PublicsStream.cpp?rev=269898&r1=269897&r2=269898&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/Raw/PublicsStream.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/Raw/PublicsStream.cpp Wed May 18 04:59:14 2016
@@ -138,10 +138,14 @@ Error PublicsStream::reload() {
// corrupted streams.
// Hash buckets follow.
- HashBuckets.resize(NumBuckets);
- if (auto EC = Reader.readArray<uint32_t>(HashBuckets))
+ std::vector<ulittle32_t> TempHashBuckets;
+ TempHashBuckets.resize(NumBuckets);
+ if (auto EC = Reader.readArray<ulittle32_t>(TempHashBuckets))
return make_error<RawError>(raw_error_code::corrupt_file,
"Hash buckets corrupted.");
+ HashBuckets.resize(NumBuckets);
+ std::copy(TempHashBuckets.begin(), TempHashBuckets.end(),
+ HashBuckets.begin());
// Something called "address map" follows.
AddressMap.resize(Header->AddrMap / sizeof(uint32_t));
More information about the llvm-commits
mailing list