summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-06-10 21:47:26 +0000
committerZachary Turner <zturner@google.com>2016-06-10 21:47:26 +0000
commit97609bb2fdb1db561b2ca0f32ff4fa413ef4e094 (patch)
tree313c327b3e8faf8a87fd2a3c8316456007bc4f48 /llvm/lib
parente1f60b1fb36c5f04b8f3aa60079cbdaf90d1805d (diff)
downloadbcm5719-llvm-97609bb2fdb1db561b2ca0f32ff4fa413ef4e094.tar.gz
bcm5719-llvm-97609bb2fdb1db561b2ca0f32ff4fa413ef4e094.zip
[pdb] Fix issues with pdb writing.
This fixes an alignment issue by forcing all cached allocations to be 8 byte aligned, and also fixes an issue arising on big endian systems by writing ulittle32_t's instead of uint32_t's in the test. llvm-svn: 272437
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/DebugInfo/PDB/Raw/MappedBlockStream.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/MappedBlockStream.cpp b/llvm/lib/DebugInfo/PDB/Raw/MappedBlockStream.cpp
index 86e799ca663..36f8ead090a 100644
--- a/llvm/lib/DebugInfo/PDB/Raw/MappedBlockStream.cpp
+++ b/llvm/lib/DebugInfo/PDB/Raw/MappedBlockStream.cpp
@@ -104,7 +104,7 @@ Error MappedBlockStream::readBytes(uint32_t Offset, uint32_t Size,
// into it, and return an ArrayRef to that. Do not touch existing pool
// allocations, as existing clients may be holding a pointer which must
// not be invalidated.
- uint8_t *WriteBuffer = Pool.Allocate<uint8_t>(Size);
+ uint8_t *WriteBuffer = static_cast<uint8_t *>(Pool.Allocate(Size, 8));
if (auto EC = readBytes(Offset, MutableArrayRef<uint8_t>(WriteBuffer, Size)))
return EC;
OpenPOWER on IntegriCloud