From aa84326694f348243d89b55044106e32ca1cf257 Mon Sep 17 00:00:00 2001 From: wangpc Date: Thu, 20 Jul 2023 15:16:21 +0800 Subject: [PATCH] [TableGen][NFC] Remove unreachable code 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. --- llvm/lib/TableGen/TGParser.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/llvm/lib/TableGen/TGParser.cpp b/llvm/lib/TableGen/TGParser.cpp index 6935f6e..c9d6230 100644 --- a/llvm/lib/TableGen/TGParser.cpp +++ b/llvm/lib/TableGen/TGParser.cpp @@ -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(NewName)) NewName = BinOp->Fold(&CurRec); -- 2.7.4