aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Bitcode/BitstreamWriter.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-04-23 18:57:32 +0000
committerChris Lattner <sabre@nondot.org>2007-04-23 18:57:32 +0000
commit2a5e354f2053fccfa35aa997935aa7100f4c2223 (patch)
treeab5b65cc3f57afbb9355ba27b1cdebcee48d2fde /include/llvm/Bitcode/BitstreamWriter.h
parent6d4135a62e9b6af2417748ab81da8dad5e2059d9 (diff)
downloadexternal_llvm-2a5e354f2053fccfa35aa997935aa7100f4c2223.tar.gz
external_llvm-2a5e354f2053fccfa35aa997935aa7100f4c2223.tar.bz2
external_llvm-2a5e354f2053fccfa35aa997935aa7100f4c2223.zip
minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36365 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Bitcode/BitstreamWriter.h')
-rw-r--r--include/llvm/Bitcode/BitstreamWriter.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/llvm/Bitcode/BitstreamWriter.h b/include/llvm/Bitcode/BitstreamWriter.h
index 61208724bf..aa2a653e53 100644
--- a/include/llvm/Bitcode/BitstreamWriter.h
+++ b/include/llvm/Bitcode/BitstreamWriter.h
@@ -32,7 +32,10 @@ class BitstreamWriter {
// 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 @@ class BitstreamWriter {
/// 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.