mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-02 07:32:52 +00:00
Inline this into its only caller.
It's clearer and additionally this gets rid of the usage of `DefmID`, which doesn't really correspond to anything in the language (it was just used in the name of this parsing function which parsed a `MultiClassID` and returned that multiclass's record). This area of the code still needs a lot of work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171938 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9d4a661076
commit
7be9021754
@ -455,14 +455,6 @@ MultiClass *TGParser::ParseMultiClassID() {
|
||||
return Result;
|
||||
}
|
||||
|
||||
Record *TGParser::ParseDefmID() {
|
||||
MultiClass *MC = ParseMultiClassID();
|
||||
if (!MC)
|
||||
return 0;
|
||||
return &MC->Rec;
|
||||
}
|
||||
|
||||
|
||||
/// ParseSubClassReference - Parse a reference to a subclass or to a templated
|
||||
/// subclass. This returns a SubClassRefTy with a null Record* on error.
|
||||
///
|
||||
@ -474,10 +466,12 @@ ParseSubClassReference(Record *CurRec, bool isDefm) {
|
||||
SubClassReference Result;
|
||||
Result.RefLoc = Lex.getLoc();
|
||||
|
||||
if (isDefm)
|
||||
Result.Rec = ParseDefmID();
|
||||
else
|
||||
if (isDefm) {
|
||||
if (MultiClass *MC = ParseMultiClassID())
|
||||
Result.Rec = &MC->Rec;
|
||||
} else {
|
||||
Result.Rec = ParseClassID();
|
||||
}
|
||||
if (Result.Rec == 0) return Result;
|
||||
|
||||
// If there is no template arg list, we're done.
|
||||
|
@ -183,7 +183,6 @@ private: // Parser methods.
|
||||
Init *ParseObjectName(MultiClass *CurMultiClass);
|
||||
Record *ParseClassID();
|
||||
MultiClass *ParseMultiClassID();
|
||||
Record *ParseDefmID();
|
||||
};
|
||||
|
||||
} // end namespace llvm
|
||||
|
Loading…
Reference in New Issue
Block a user