From 10b043e2ab08f234780b9b5dec39f5478e211f60 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 10 Feb 2013 06:07:16 +0000 Subject: [PATCH] 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 --- include/llvm/Bitcode/BitstreamReader.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/llvm/Bitcode/BitstreamReader.h b/include/llvm/Bitcode/BitstreamReader.h index 9a8c370f004..48a6989deb5 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 Endian_T; - CurWord = *(Endian_T*)(void*)buf; + CurWord = *(Endian_T*)buf; NextChar += sizeof(word_t); -- 2.34.1