diff options
author | Chris Lattner <sabre@nondot.org> | 2013-02-10 06:07:16 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2013-02-10 06:07:16 +0000 |
commit | 10b043e2ab08f234780b9b5dec39f5478e211f60 (patch) | |
tree | 77bd7a74712ee5a65ebc38cb7a18b110e11ed0aa /include/llvm/Bitcode | |
parent | bf8f4cb0d5edc30854be46ec394d267b0c6013cd (diff) | |
download | external_llvm-10b043e2ab08f234780b9b5dec39f5478e211f60.zip external_llvm-10b043e2ab08f234780b9b5dec39f5478e211f60.tar.gz external_llvm-10b043e2ab08f234780b9b5dec39f5478e211f60.tar.bz2 |
hopefully "really" fix a type punning warning by defining the buffer as
type char, which can't have TBAA tags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174826 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Bitcode')
-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); |