diff options
author | Chris Lattner <sabre@nondot.org> | 2007-04-29 19:17:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-04-29 19:17:32 +0000 |
commit | bd40a6d3ee9658f9bfd6ab74893fca5fa75c6de0 (patch) | |
tree | ea8b62f1b6eb9744c95e6838a982d6c92f19100e /include/llvm/Bitcode | |
parent | 1d81d88fe36a70ed2f9040413c85adb88dbf4eb6 (diff) | |
download | external_llvm-bd40a6d3ee9658f9bfd6ab74893fca5fa75c6de0.zip external_llvm-bd40a6d3ee9658f9bfd6ab74893fca5fa75c6de0.tar.gz external_llvm-bd40a6d3ee9658f9bfd6ab74893fca5fa75c6de0.tar.bz2 |
add a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36571 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Bitcode')
-rw-r--r-- | include/llvm/Bitcode/BitstreamReader.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Bitcode/BitstreamReader.h b/include/llvm/Bitcode/BitstreamReader.h index 550459e..f41c4f0 100644 --- a/include/llvm/Bitcode/BitstreamReader.h +++ b/include/llvm/Bitcode/BitstreamReader.h @@ -72,6 +72,12 @@ public: bool AtEndOfStream() const { return NextChar == LastChar; } + /// GetCurrentBitNo - Return the bit # of the bit we are reading. + uint64_t GetCurrentBitNo() const { + return CurWord * 32ULL + (32-CurCodeSize); + } + + uint32_t Read(unsigned NumBits) { // If the field is fully contained by CurWord, return it quickly. if (BitsInCurWord >= NumBits) { |