diff options
author | Chris Lattner <sabre@nondot.org> | 2007-05-05 01:29:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-05-05 01:29:31 +0000 |
commit | 44b0f10721a9861c870f581766b4b8d8a0210fc3 (patch) | |
tree | 0d547bef65c1c22fc848df261611cd8568cde846 /tools/llvm-bcanalyzer | |
parent | ff294a4e1e734d9fc1d5798ff9e00db4d70b5856 (diff) | |
download | external_llvm-44b0f10721a9861c870f581766b4b8d8a0210fc3.zip external_llvm-44b0f10721a9861c870f581766b4b8d8a0210fc3.tar.gz external_llvm-44b0f10721a9861c870f581766b4b8d8a0210fc3.tar.bz2 |
do not charge subblock sizes to the parent block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36772 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-bcanalyzer')
-rw-r--r-- | tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp b/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp index 4390f4d..971ef5c 100644 --- a/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp +++ b/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp @@ -312,11 +312,17 @@ static bool ParseBlock(BitstreamReader &Stream, unsigned IndentLevel) { } return false; } - case bitc::ENTER_SUBBLOCK: + case bitc::ENTER_SUBBLOCK: { + uint64_t SubBlockBitStart = Stream.GetCurrentBitNo(); if (ParseBlock(Stream, IndentLevel+1)) return true; ++BlockStats.NumSubBlocks; + uint64_t SubBlockBitEnd = Stream.GetCurrentBitNo(); + + // Don't include subblock sizes in the size of this block. + BlockBitStart += SubBlockBitEnd-SubBlockBitStart; break; + } case bitc::DEFINE_ABBREV: Stream.ReadAbbrevRecord(); ++BlockStats.NumAbbrevs; |