mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 18:24:00 +00:00
stringref'ize readRecord and properly capitalize it. Add a compatibility method to easy
the transition. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172940 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -198,9 +198,9 @@ void BitstreamCursor::skipRecord(unsigned AbbrevID) {
|
||||
}
|
||||
}
|
||||
|
||||
unsigned BitstreamCursor::ReadRecord(unsigned AbbrevID,
|
||||
unsigned BitstreamCursor::readRecord(unsigned AbbrevID,
|
||||
SmallVectorImpl<uint64_t> &Vals,
|
||||
const char **BlobStart, unsigned *BlobLen){
|
||||
StringRef *Blob) {
|
||||
if (AbbrevID == bitc::UNABBREV_RECORD) {
|
||||
unsigned Code = ReadVBR(6);
|
||||
unsigned NumElts = ReadVBR(6);
|
||||
@ -256,10 +256,11 @@ unsigned BitstreamCursor::ReadRecord(unsigned AbbrevID,
|
||||
|
||||
// Otherwise, read the number of bytes. If we can return a reference to
|
||||
// the data, do so to avoid copying it.
|
||||
if (BlobStart) {
|
||||
*BlobStart = (const char*)BitStream->getBitcodeBytes().getPointer(
|
||||
NextChar, NumElts);
|
||||
*BlobLen = NumElts;
|
||||
if (Blob) {
|
||||
*Blob =
|
||||
StringRef((const char*)BitStream->getBitcodeBytes().getPointer(
|
||||
NextChar, NumElts),
|
||||
NumElts);
|
||||
} else {
|
||||
for (; NumElts; ++NextChar, --NumElts)
|
||||
Vals.push_back(getByte(NextChar));
|
||||
|
Reference in New Issue
Block a user