From: Douglas Gregor Date: Wed, 8 Apr 2009 15:18:21 +0000 (+0000) Subject: Add BitstreamWriter::GetCurrentBitNo, to report where we are in the output bitstream X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=b7e7886c79cd273f68eb47b534135322fa76c68d;p=oota-llvm.git 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 --- diff --git a/include/llvm/Bitcode/BitstreamWriter.h b/include/llvm/Bitcode/BitstreamWriter.h index 78b4f5e02ca..49fce1fcc81 100644 --- a/include/llvm/Bitcode/BitstreamWriter.h +++ b/include/llvm/Bitcode/BitstreamWriter.h @@ -79,6 +79,9 @@ public: std::vector &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. //===--------------------------------------------------------------------===//