aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Bitcode
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2013-01-20 02:54:05 +0000
committerChris Lattner <sabre@nondot.org>2013-01-20 02:54:05 +0000
commit1ca114a66b666f932741d00d74636dc35ea1d466 (patch)
treecd916793202962032b7fed9498a6b8c687882ca1 /include/llvm/Bitcode
parent4156ca76e31877b17063a6e01fb7f1dad771c5aa (diff)
downloadexternal_llvm-1ca114a66b666f932741d00d74636dc35ea1d466.zip
external_llvm-1ca114a66b666f932741d00d74636dc35ea1d466.tar.gz
external_llvm-1ca114a66b666f932741d00d74636dc35ea1d466.tar.bz2
trivial micro-optimization: lazily call the virtual method instead of eagerly calling it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172953 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Bitcode')
-rw-r--r--include/llvm/Bitcode/BitstreamReader.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/llvm/Bitcode/BitstreamReader.h b/include/llvm/Bitcode/BitstreamReader.h
index 0d9bd3e4..847aaad 100644
--- a/include/llvm/Bitcode/BitstreamReader.h
+++ b/include/llvm/Bitcode/BitstreamReader.h
@@ -158,7 +158,6 @@ struct BitstreamEntry {
BitstreamEntry E; E.Kind = Record; E.ID = AbbrevID; return E;
}
};
-
/// BitstreamCursor - This represents a position within a bitcode file. There
/// may be multiple independent cursors reading within one bitstream, each
@@ -251,7 +250,7 @@ public:
}
bool AtEndOfStream() {
- return isEndPos(NextChar) && BitsInCurWord == 0;
+ return BitsInCurWord == 0 && isEndPos(NextChar);
}
/// getAbbrevIDWidth - Return the number of bits used to encode an abbrev #.