switch llvm-bcanalyzer onto the new cursor APIs, allowing deletion of

the old ReadRecord methods.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172952 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2013-01-20 02:50:32 +00:00
parent 52878db465
commit 4156ca76e3
2 changed files with 67 additions and 78 deletions

View File

@ -158,6 +158,7 @@ struct BitstreamEntry {
BitstreamEntry E; E.Kind = Record; E.ID = AbbrevID; return E;
}
};
/// BitstreamCursor - This represents a position within a bitcode file. There
/// may be multiple independent cursors reading within one bitstream, each
@ -516,22 +517,6 @@ public:
unsigned readRecord(unsigned AbbrevID, SmallVectorImpl<uint64_t> &Vals,
StringRef *Blob = 0);
unsigned ReadRecord(unsigned AbbrevID, SmallVectorImpl<uint64_t> &Vals,
const char **BlobStart = 0, unsigned *BlobLen = 0) {
if (!BlobStart)
return readRecord(AbbrevID, Vals);
StringRef S;
unsigned X = readRecord(AbbrevID, Vals, &S);
*BlobStart = S.data();
*BlobLen = S.size();
return X;
}
unsigned ReadRecord(unsigned AbbrevID, SmallVectorImpl<uint64_t> &Vals,
const char *&BlobStart, unsigned &BlobLen) {
return ReadRecord(AbbrevID, Vals, &BlobStart, &BlobLen);
}
//===--------------------------------------------------------------------===//
// Abbrev Processing
//===--------------------------------------------------------------------===//