[llvm-commits] CVS: llvm/include/llvm/Bitcode/BitstreamWriter.h
Chris Lattner
sabre at nondot.org
Mon Apr 23 11:57:50 PDT 2007
Changes in directory llvm/include/llvm/Bitcode:
BitstreamWriter.h updated: 1.4 -> 1.5
---
Log message:
minor cleanups
---
Diffs of the changes: (+5 -3)
BitstreamWriter.h | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
Index: llvm/include/llvm/Bitcode/BitstreamWriter.h
diff -u llvm/include/llvm/Bitcode/BitstreamWriter.h:1.4 llvm/include/llvm/Bitcode/BitstreamWriter.h:1.5
--- llvm/include/llvm/Bitcode/BitstreamWriter.h:1.4 Mon Apr 23 12:43:52 2007
+++ llvm/include/llvm/Bitcode/BitstreamWriter.h Mon Apr 23 13:57:32 2007
@@ -32,7 +32,10 @@
// CurCodeSize - This is the declared size of code values used for the current
// block, in bits.
unsigned CurCodeSize;
-
+
+ /// CurAbbrevs - Abbrevs installed at in this block.
+ std::vector<BitCodeAbbrev*> CurAbbrevs;
+
struct Block {
unsigned PrevCodeSize;
unsigned StartSizeWord;
@@ -43,14 +46,13 @@
/// BlockScope - This tracks the current blocks that we have entered.
std::vector<Block> BlockScope;
- std::vector<BitCodeAbbrev*> CurAbbrevs;
public:
BitstreamWriter(std::vector<unsigned char> &O)
: Out(O), CurBit(0), CurValue(0), CurCodeSize(2) {}
~BitstreamWriter() {
assert(CurBit == 0 && "Unflused data remaining");
- assert(BlockScope.empty() && "Block imbalance");
+ assert(BlockScope.empty() && CurAbbrevs.empty() && "Block imbalance");
}
//===--------------------------------------------------------------------===//
// Basic Primitives for emitting bits to the stream.
More information about the llvm-commits
mailing list