llvm.org GIT mirror llvm / dccf3ce
[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 Zachary Turner 10 months ago
3 changed file(s) with 3 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
5151 public:
5252 const GSIHashHeader *HashHdr;
5353 FixedStreamArray HashRecords;
54 ArrayRef32_t> HashBitmap;
54 FixedStreamArray32_t> HashBitmap;
5555 FixedStreamArray HashBuckets;
5656 std::array BucketMap;
5757
120120
121121 static Error
122122 readGSIHashBuckets(FixedStreamArray &HashBuckets,
123 ArrayRef &HashBitmap, const GSIHashHeader *HashHdr,
123 FixedStreamArray &HashBitmap,
124 const GSIHashHeader *HashHdr,
124125 MutableArrayRef BucketMap,
125126 BinaryStreamReader &Reader) {
126127 if (auto EC = checkHashHdrVersion(HashHdr))
17071707
17081708 // Return early if we aren't dumping public hash table and address map info.
17091709 if (HashExtras) {
1710 ArrayRef BitmapBytes(
1711 reinterpret_cast(Table.HashBitmap.data()),
1712 Table.HashBitmap.size() * sizeof(uint32_t));
1713 P.formatBinary("Hash Bitmap", BitmapBytes, 0);
1714
17151710 P.formatLine("Hash Entries");
17161711 {
17171712 AutoIndent Indent2(P);