[llvm-commits] [llvm] r173062 - in /llvm/trunk: include/llvm/Bitcode/BitstreamReader.h lib/Bitcode/Reader/BitstreamReader.cpp
Chris Lattner
sabre at nondot.org
Mon Jan 21 10:04:19 PST 2013
Author: lattner
Date: Mon Jan 21 12:04:19 2013
New Revision: 173062
URL: http://llvm.org/viewvc/llvm-project?rev=173062&view=rev
Log:
rename "SkipToWord" to "SkipToFourByteBoundary" since a word is not always 4 bytes.
Modified:
llvm/trunk/include/llvm/Bitcode/BitstreamReader.h
llvm/trunk/lib/Bitcode/Reader/BitstreamReader.cpp
Modified: llvm/trunk/include/llvm/Bitcode/BitstreamReader.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Bitcode/BitstreamReader.h?rev=173062&r1=173061&r2=173062&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Bitcode/BitstreamReader.h (original)
+++ llvm/trunk/include/llvm/Bitcode/BitstreamReader.h Mon Jan 21 12:04:19 2013
@@ -422,7 +422,7 @@
}
}
- void SkipToWord() {
+ void SkipToFourByteBoundary() {
BitsInCurWord = 0;
CurWord = 0;
}
@@ -448,7 +448,7 @@
// Read and ignore the codelen value. Since we are skipping this block, we
// don't care what code widths are used inside of it.
ReadVBR(bitc::CodeLenWidth);
- SkipToWord();
+ SkipToFourByteBoundary();
unsigned NumWords = Read(bitc::BlockSizeWidth);
// Check that the block wasn't partially defined, and that the offset isn't
@@ -470,7 +470,7 @@
// Block tail:
// [END_BLOCK, <align4bytes>]
- SkipToWord();
+ SkipToFourByteBoundary();
popBlockScope();
return false;
Modified: llvm/trunk/lib/Bitcode/Reader/BitstreamReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitstreamReader.cpp?rev=173062&r1=173061&r2=173062&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Reader/BitstreamReader.cpp (original)
+++ llvm/trunk/lib/Bitcode/Reader/BitstreamReader.cpp Mon Jan 21 12:04:19 2013
@@ -78,7 +78,7 @@
// Get the codesize of this block.
CurCodeSize = ReadVBR(bitc::CodeLenWidth);
- SkipToWord();
+ SkipToFourByteBoundary();
unsigned NumWords = Read(bitc::BlockSizeWidth);
if (NumWordsP) *NumWordsP = NumWords;
@@ -181,7 +181,7 @@
assert(Op.getEncoding() == BitCodeAbbrevOp::Blob);
// Blob case. Read the number of bytes as a vbr6.
unsigned NumElts = ReadVBR(6);
- SkipToWord(); // 32-bit alignment
+ SkipToFourByteBoundary(); // 32-bit alignment
// Figure out where the end of this blob will be including tail padding.
size_t NewEnd = NextChar+((NumElts+3)&~3);
@@ -241,7 +241,7 @@
assert(Op.getEncoding() == BitCodeAbbrevOp::Blob);
// Blob case. Read the number of bytes as a vbr6.
unsigned NumElts = ReadVBR(6);
- SkipToWord(); // 32-bit alignment
+ SkipToFourByteBoundary(); // 32-bit alignment
// Figure out where the end of this blob will be including tail padding.
size_t NewEnd = NextChar+((NumElts+3)&~3);
More information about the llvm-commits
mailing list