[llvm-commits] [llvm] r68610 - /llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h
Douglas Gregor
dgregor at apple.com
Wed Apr 8 08:18:22 PDT 2009
Author: dgregor
Date: Wed Apr 8 10:18:21 2009
New Revision: 68610
URL: http://llvm.org/viewvc/llvm-project?rev=68610&view=rev
Log:
Add BitstreamWriter::GetCurrentBitNo, to report where we are in the output bitstream
Modified:
llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h
Modified: llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h?rev=68610&r1=68609&r2=68610&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h (original)
+++ llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h Wed Apr 8 10:18:21 2009
@@ -79,6 +79,9 @@
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.
//===--------------------------------------------------------------------===//
More information about the llvm-commits
mailing list