do not charge subblock sizes to the parent block.

llvm-svn: 36772
This commit is contained in:
Chris Lattner 2007-05-05 01:29:31 +00:00
parent e760d6f4c1
commit 9e808cd330
1 changed files with 7 additions and 1 deletions

View File

@ -312,11 +312,17 @@ static bool ParseBlock(BitstreamReader &Stream, unsigned IndentLevel) {
} }
return false; return false;
} }
case bitc::ENTER_SUBBLOCK: case bitc::ENTER_SUBBLOCK: {
uint64_t SubBlockBitStart = Stream.GetCurrentBitNo();
if (ParseBlock(Stream, IndentLevel+1)) if (ParseBlock(Stream, IndentLevel+1))
return true; return true;
++BlockStats.NumSubBlocks; ++BlockStats.NumSubBlocks;
uint64_t SubBlockBitEnd = Stream.GetCurrentBitNo();
// Don't include subblock sizes in the size of this block.
BlockBitStart += SubBlockBitEnd-SubBlockBitStart;
break; break;
}
case bitc::DEFINE_ABBREV: case bitc::DEFINE_ABBREV:
Stream.ReadAbbrevRecord(); Stream.ReadAbbrevRecord();
++BlockStats.NumAbbrevs; ++BlockStats.NumAbbrevs;