mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
allow clients to look up abbrev id's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68471 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
298a82dd0d
commit
123f384879
@ -363,6 +363,14 @@ private:
|
||||
}
|
||||
}
|
||||
public:
|
||||
|
||||
/// getAbbrev - Return the abbreviation for the specified AbbrevId.
|
||||
const BitCodeAbbrev *getAbbrev(unsigned AbbrevID) {
|
||||
unsigned AbbrevNo = AbbrevID-bitc::FIRST_APPLICATION_ABBREV;
|
||||
assert(AbbrevNo < CurAbbrevs.size() && "Invalid abbrev #!");
|
||||
return CurAbbrevs[AbbrevNo];
|
||||
}
|
||||
|
||||
unsigned ReadRecord(unsigned AbbrevID, SmallVectorImpl<uint64_t> &Vals) {
|
||||
if (AbbrevID == bitc::UNABBREV_RECORD) {
|
||||
unsigned Code = ReadVBR(6);
|
||||
@ -372,9 +380,7 @@ public:
|
||||
return Code;
|
||||
}
|
||||
|
||||
unsigned AbbrevNo = AbbrevID-bitc::FIRST_APPLICATION_ABBREV;
|
||||
assert(AbbrevNo < CurAbbrevs.size() && "Invalid abbrev #!");
|
||||
BitCodeAbbrev *Abbv = CurAbbrevs[AbbrevNo];
|
||||
const BitCodeAbbrev *Abbv = getAbbrev(AbbrevID);
|
||||
|
||||
for (unsigned i = 0, e = Abbv->getNumOperandInfos(); i != e; ++i) {
|
||||
const BitCodeAbbrevOp &Op = Abbv->getOperandInfo(i);
|
||||
|
Loading…
x
Reference in New Issue
Block a user