diff options
-rw-r--r-- | include/llvm/Bitcode/BitstreamReader.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/llvm/Bitcode/BitstreamReader.h b/include/llvm/Bitcode/BitstreamReader.h index 9a8c370..48a6989 100644 --- a/include/llvm/Bitcode/BitstreamReader.h +++ b/include/llvm/Bitcode/BitstreamReader.h @@ -364,12 +364,13 @@ public: uint32_t R = uint32_t(CurWord); // Read the next word from the stream. - uint8_t buf[sizeof(word_t)] = {0}; - BitStream->getBitcodeBytes().readBytes(NextChar, sizeof(buf), buf, NULL); + char buf[sizeof(word_t)] = {0}; + BitStream->getBitcodeBytes().readBytes(NextChar, sizeof(buf), + (uint8_t*)buf, NULL); typedef support::detail::packed_endian_specific_integral <word_t, support::little, support::unaligned> Endian_T; - CurWord = *(Endian_T*)(void*)buf; + CurWord = *(Endian_T*)buf; NextChar += sizeof(word_t); |