summaryrefslogtreecommitdiff
path: root/include/llvm/Bitcode
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-08 15:18:21 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-08 15:18:21 +0000
commitb7e7886c79cd273f68eb47b534135322fa76c68d (patch)
tree314afcf0d3ff9e84c983577ee7d28ae3ce573236 /include/llvm/Bitcode
parent7beb1ec2988d6d223714c6bcc239fb2a89db7f67 (diff)
downloadllvm-b7e7886c79cd273f68eb47b534135322fa76c68d.tar.gz
llvm-b7e7886c79cd273f68eb47b534135322fa76c68d.tar.bz2
llvm-b7e7886c79cd273f68eb47b534135322fa76c68d.tar.xz
Add BitstreamWriter::GetCurrentBitNo, to report where we are in the output bitstream
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68610 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Bitcode')
-rw-r--r--include/llvm/Bitcode/BitstreamWriter.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/Bitcode/BitstreamWriter.h b/include/llvm/Bitcode/BitstreamWriter.h
index 78b4f5e02c..49fce1fcc8 100644
--- a/include/llvm/Bitcode/BitstreamWriter.h
+++ b/include/llvm/Bitcode/BitstreamWriter.h
@@ -79,6 +79,9 @@ public:
std::vector<unsigned char> &getBuffer() { return Out; }
+ /// \brief Retrieve the current position in the stream, in bits.
+ uint64_t GetCurrentBitNo() const { return Out.size() * CHAR_BIT + CurBit; }
+
//===--------------------------------------------------------------------===//
// Basic Primitives for emitting bits to the stream.
//===--------------------------------------------------------------------===//