diff options
author | Jeff Cohen <jeffc@jolt-lang.org> | 2007-04-22 15:00:52 +0000 |
---|---|---|
committer | Jeff Cohen <jeffc@jolt-lang.org> | 2007-04-22 15:00:52 +0000 |
commit | a0c96a068ca7027644b5f1972f9c388fa542d278 (patch) | |
tree | 3aa73b566bdb6974015c7a072e986f024c7f8c39 /include/llvm/Bitcode/BitstreamReader.h | |
parent | cb75731bf481a109d4706fc602cc233007843457 (diff) | |
download | external_llvm-a0c96a068ca7027644b5f1972f9c388fa542d278.tar.gz external_llvm-a0c96a068ca7027644b5f1972f9c388fa542d278.tar.bz2 external_llvm-a0c96a068ca7027644b5f1972f9c388fa542d278.zip |
Teach Visual Studio about Bitcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36341 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Bitcode/BitstreamReader.h')
-rw-r--r-- | include/llvm/Bitcode/BitstreamReader.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/llvm/Bitcode/BitstreamReader.h b/include/llvm/Bitcode/BitstreamReader.h index ceae5afbe9..feaf84fb0a 100644 --- a/include/llvm/Bitcode/BitstreamReader.h +++ b/include/llvm/Bitcode/BitstreamReader.h @@ -17,6 +17,7 @@ #include "llvm/Bitcode/BitCodes.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/Support/DataTypes.h" #include <cassert> namespace llvm { @@ -91,7 +92,7 @@ public: uint32_t ReadVBR(unsigned NumBits) { uint32_t Piece = Read(NumBits); - if ((Piece & (1U << NumBits-1)) == 0) + if ((Piece & (1U << (NumBits-1))) == 0) return Piece; uint32_t Result = 0; @@ -99,7 +100,7 @@ public: while (1) { Result |= (Piece & ((1U << (NumBits-1))-1)) << NextBit; - if ((Piece & (1U << NumBits-1)) == 0) + if ((Piece & (1U << (NumBits-1))) == 0) return Result; NextBit += NumBits-1; @@ -109,7 +110,7 @@ public: uint64_t ReadVBR64(unsigned NumBits) { uint64_t Piece = Read(NumBits); - if ((Piece & (1U << NumBits-1)) == 0) + if ((Piece & (1U << (NumBits-1))) == 0) return Piece; uint64_t Result = 0; @@ -117,7 +118,7 @@ public: while (1) { Result |= (Piece & ((1U << (NumBits-1))-1)) << NextBit; - if ((Piece & (1U << NumBits-1)) == 0) + if ((Piece & (1U << (NumBits-1))) == 0) return Result; NextBit += NumBits-1; @@ -209,6 +210,7 @@ public: } assert(0 && "Reading with abbrevs not implemented!"); + return 0; } }; |