diff options
author | Chris Lattner <sabre@nondot.org> | 2013-01-19 21:35:24 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2013-01-19 21:35:24 +0000 |
commit | ab7701749c4a082e2a8cf9ca850b879c0c5a0cf3 (patch) | |
tree | 208d96ddc3188ddf1d714927b529b9da251f5ff3 /llvm/lib/Bitcode | |
parent | 9e4fc280f90665044271398b1398266e6f571b74 (diff) | |
download | bcm5719-llvm-ab7701749c4a082e2a8cf9ca850b879c0c5a0cf3.tar.gz bcm5719-llvm-ab7701749c4a082e2a8cf9ca850b879c0c5a0cf3.zip |
Add a new BitstreamEntry concept, and add two helper methods for walking
through a BitstreamCursor that produce it: advance() and
advanceSkippingSubblocks(), representing the two most common ways clients
want to walk through bitcode.
llvm-svn: 172919
Diffstat (limited to 'llvm/lib/Bitcode')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitstreamReader.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index fba876936e3..b14250b0662 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -1737,7 +1737,7 @@ bool BitcodeReader::ParseBitcodeInto(Module *M) { // The ranlib in xcode 4 will align archive members by appending newlines // to the end of them. If this file size is a multiple of 4 but not 8, we // have to read and ignore these final 4 bytes :-( - if (Stream.GetAbbrevIDWidth() == 2 && Code == 2 && + if (Stream.getAbbrevIDWidth() == 2 && Code == 2 && Stream.Read(6) == 2 && Stream.Read(24) == 0xa0a0a && Stream.AtEndOfStream()) return false; diff --git a/llvm/lib/Bitcode/Reader/BitstreamReader.cpp b/llvm/lib/Bitcode/Reader/BitstreamReader.cpp index abc78acce72..a5a7c0b8eed 100644 --- a/llvm/lib/Bitcode/Reader/BitstreamReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitstreamReader.cpp @@ -150,7 +150,7 @@ unsigned BitstreamCursor::ReadRecord(unsigned AbbrevID, // the data, do so to avoid copying it. if (BlobStart) { *BlobStart = (const char*)BitStream->getBitcodeBytes().getPointer( - NextChar, NumElts); + NextChar, NumElts); *BlobLen = NumElts; } else { for (; NumElts; ++NextChar, --NumElts) |