From: Chris Lattner Date: Mon, 21 Jan 2013 18:04:19 +0000 (+0000) Subject: rename "SkipToWord" to "SkipToFourByteBoundary" since a word is not always 4 bytes. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e1817aae5f2612f45cda1983ce515a0f2fdea7c1;p=platform%2Fupstream%2Fllvm.git rename "SkipToWord" to "SkipToFourByteBoundary" since a word is not always 4 bytes. llvm-svn: 173062 --- diff --git a/llvm/include/llvm/Bitcode/BitstreamReader.h b/llvm/include/llvm/Bitcode/BitstreamReader.h index 847aaad..16f9686 100644 --- a/llvm/include/llvm/Bitcode/BitstreamReader.h +++ b/llvm/include/llvm/Bitcode/BitstreamReader.h @@ -422,7 +422,7 @@ public: } } - void SkipToWord() { + void SkipToFourByteBoundary() { BitsInCurWord = 0; CurWord = 0; } @@ -448,7 +448,7 @@ public: // 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 @@ public: // Block tail: // [END_BLOCK, ] - SkipToWord(); + SkipToFourByteBoundary(); popBlockScope(); return false; diff --git a/llvm/lib/Bitcode/Reader/BitstreamReader.cpp b/llvm/lib/Bitcode/Reader/BitstreamReader.cpp index 83df57b..eb8b5de 100644 --- a/llvm/lib/Bitcode/Reader/BitstreamReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitstreamReader.cpp @@ -78,7 +78,7 @@ bool BitstreamCursor::EnterSubBlock(unsigned BlockID, unsigned *NumWordsP) { // 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 @@ void BitstreamCursor::skipRecord(unsigned AbbrevID) { 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 @@ unsigned BitstreamCursor::readRecord(unsigned AbbrevID, 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);