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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172919 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2013-01-19 21:35:24 +00:00
parent 35f63ddc8f
commit 63246aa04f
3 changed files with 94 additions and 9 deletions

View File

@ -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)