mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-16 12:24:03 +00:00
move some private methods out of line, add a skipRecord() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172931 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -488,31 +488,12 @@ private:
|
||||
//===--------------------------------------------------------------------===//
|
||||
|
||||
private:
|
||||
void ReadAbbreviatedLiteral(const BitCodeAbbrevOp &Op,
|
||||
SmallVectorImpl<uint64_t> &Vals) {
|
||||
assert(Op.isLiteral() && "Not a literal");
|
||||
// If the abbrev specifies the literal value to use, use it.
|
||||
Vals.push_back(Op.getLiteralValue());
|
||||
}
|
||||
|
||||
void ReadAbbreviatedField(const BitCodeAbbrevOp &Op,
|
||||
SmallVectorImpl<uint64_t> &Vals) {
|
||||
assert(!Op.isLiteral() && "Use ReadAbbreviatedLiteral for literals!");
|
||||
|
||||
// Decode the value as we are commanded.
|
||||
switch (Op.getEncoding()) {
|
||||
default: llvm_unreachable("Unknown encoding!");
|
||||
case BitCodeAbbrevOp::Fixed:
|
||||
Vals.push_back(Read((unsigned)Op.getEncodingData()));
|
||||
break;
|
||||
case BitCodeAbbrevOp::VBR:
|
||||
Vals.push_back(ReadVBR64((unsigned)Op.getEncodingData()));
|
||||
break;
|
||||
case BitCodeAbbrevOp::Char6:
|
||||
Vals.push_back(BitCodeAbbrevOp::DecodeChar6(Read(6)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
void readAbbreviatedLiteral(const BitCodeAbbrevOp &Op,
|
||||
SmallVectorImpl<uint64_t> &Vals);
|
||||
void readAbbreviatedField(const BitCodeAbbrevOp &Op,
|
||||
SmallVectorImpl<uint64_t> &Vals);
|
||||
void skipAbbreviatedField(const BitCodeAbbrevOp &Op);
|
||||
|
||||
public:
|
||||
|
||||
/// getAbbrev - Return the abbreviation for the specified AbbrevId.
|
||||
@ -522,6 +503,9 @@ public:
|
||||
return CurAbbrevs[AbbrevNo];
|
||||
}
|
||||
|
||||
/// skipRecord - Read the current record and discard it.
|
||||
void skipRecord(unsigned AbbrevID);
|
||||
|
||||
unsigned ReadRecord(unsigned AbbrevID, SmallVectorImpl<uint64_t> &Vals,
|
||||
const char **BlobStart = 0, unsigned *BlobLen = 0);
|
||||
|
||||
@ -530,7 +514,6 @@ public:
|
||||
return ReadRecord(AbbrevID, Vals, &BlobStart, &BlobLen);
|
||||
}
|
||||
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
// Abbrev Processing
|
||||
//===--------------------------------------------------------------------===//
|
||||
|
Reference in New Issue
Block a user