From: Rafael Espindola Date: Thu, 13 Nov 2014 14:45:22 +0000 (+0000) Subject: Simplify code a bit. NFC. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9731c7a01625ca0870b956949b20e3f05fea5f1d;p=oota-llvm.git Simplify code a bit. NFC. Thanks to Sean Silva for the suggestion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221892 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Bitcode/BitstreamReader.h b/include/llvm/Bitcode/BitstreamReader.h index ed1ecc385f0..abe21c7da97 100644 --- a/include/llvm/Bitcode/BitstreamReader.h +++ b/include/llvm/Bitcode/BitstreamReader.h @@ -334,12 +334,9 @@ public: return; } - // Handle big-endian byte-swapping if necessary. - support::detail::packed_endian_specific_integral< - word_t, support::little, support::unaligned> EndianValue; - memcpy(&EndianValue, Array, sizeof(Array)); - - CurWord = EndianValue; + CurWord = + support::endian::read( + Array); NextChar += BytesRead; BitsInCurWord = BytesRead * 8; }