[llvm-commits] [llvm] r68610 - /llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h
Chris Lattner
clattner at apple.com
Wed Apr 8 09:52:45 PDT 2009
Doug, can you just use 8 instead of CHAR_BIT?
On Apr 8, 2009, at 9:42 AM, Preston Gurd wrote:
> This patch breaks my build, because CHAR_BIT is undefined.
>
> Surely the patch must also add an include of <limits.h> to obtain the
> definition of CHAR_BIT?
>
>
>
> On Wed, 2009-04-08 at 11:18 -0400, Douglas Gregor wrote:
>> 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.
>> //
>> =
>> =
>> =
>> --------------------------------------------------------------------
>> ===//
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list