[llvm-commits] CVS: llvm/include/llvm/Bitcode/BitstreamReader.h BitstreamWriter.h
Jeff Cohen
jeffc at jolt-lang.org
Sun Apr 22 08:01:16 PDT 2007
Changes in directory llvm/include/llvm/Bitcode:
BitstreamReader.h updated: 1.1 -> 1.2
BitstreamWriter.h updated: 1.1 -> 1.2
---
Log message:
Teach Visual Studio about Bitcode.
---
Diffs of the changes: (+8 -5)
BitstreamReader.h | 10 ++++++----
BitstreamWriter.h | 3 ++-
2 files changed, 8 insertions(+), 5 deletions(-)
Index: llvm/include/llvm/Bitcode/BitstreamReader.h
diff -u llvm/include/llvm/Bitcode/BitstreamReader.h:1.1 llvm/include/llvm/Bitcode/BitstreamReader.h:1.2
--- llvm/include/llvm/Bitcode/BitstreamReader.h:1.1 Sun Apr 22 01:22:05 2007
+++ llvm/include/llvm/Bitcode/BitstreamReader.h Sun Apr 22 10:00:52 2007
@@ -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 @@
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 @@
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 @@
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 @@
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 @@
}
assert(0 && "Reading with abbrevs not implemented!");
+ return 0;
}
};
Index: llvm/include/llvm/Bitcode/BitstreamWriter.h
diff -u llvm/include/llvm/Bitcode/BitstreamWriter.h:1.1 llvm/include/llvm/Bitcode/BitstreamWriter.h:1.2
--- llvm/include/llvm/Bitcode/BitstreamWriter.h:1.1 Sun Apr 22 01:22:05 2007
+++ llvm/include/llvm/Bitcode/BitstreamWriter.h Sun Apr 22 10:00:52 2007
@@ -17,6 +17,7 @@
#include "llvm/Bitcode/BitCodes.h"
#include "llvm/ADT/SmallVector.h"
+#include "llvm/Support/DataTypes.h"
#include <cassert>
#include <vector>
@@ -72,7 +73,7 @@
Out.push_back((unsigned char)(V >> 24));
if (CurBit)
- CurValue = Val >> 32-CurBit;
+ CurValue = Val >> (32-CurBit);
else
CurValue = 0;
CurBit = (CurBit+NumBits) & 31;
More information about the llvm-commits
mailing list