summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Bitcode/BitstreamReader.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Bitcode/BitstreamReader.h b/include/llvm/Bitcode/BitstreamReader.h
index 550459e15f..f41c4f0ec3 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) {