Skip to content

Commit

Permalink
[TableGen][NFC] Remove unreachable code
Browse files Browse the repository at this point in the history
The removed code assumed that we can define classes inside a multiclass,
so the name of outer multiclass is concatenated to the qualified name.
But for current TableGen grammar, we can't define classes in multiclass,
so it is unnecessary.

This commit is requested in D152998.
  • Loading branch information
wangpc-pp committed Jul 20, 2023
1 parent 528447f commit aa84326
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions llvm/lib/TableGen/TGParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ static Init *QualifyName(Record &CurRec, MultiClass *CurMultiClass, Init *Name,
Init *NewName = BinOpInit::getStrConcat(CurRec.getNameInit(),
StringInit::get(RK, Scoper));
NewName = BinOpInit::getStrConcat(NewName, Name);
if (CurMultiClass && Scoper != "::") {
Init *Prefix = BinOpInit::getStrConcat(CurMultiClass->Rec.getNameInit(),
StringInit::get(RK, "::"));
NewName = BinOpInit::getStrConcat(Prefix, NewName);
}

if (BinOpInit *BinOp = dyn_cast<BinOpInit>(NewName))
NewName = BinOp->Fold(&CurRec);
Expand Down

0 comments on commit aa84326

Please sign in to comment.