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
This commit is contained in:
Chris Lattner 2013-02-10 06:07:16 +00:00
parent bf8f4cb0d5
commit 10b043e2ab

View File

@ -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);