[llvm] aa84326 - [TableGen][NFC] Remove unreachable code
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 20 00:24:37 PDT 2023
Author: wangpc
Date: 2023-07-20T15:24:09+08:00
New Revision: aa84326694f348243d89b55044106e32ca1cf257
URL: https://github.com/llvm/llvm-project/commit/aa84326694f348243d89b55044106e32ca1cf257
DIFF: https://github.com/llvm/llvm-project/commit/aa84326694f348243d89b55044106e32ca1cf257.diff
LOG: [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.
Added:
Modified:
llvm/lib/TableGen/TGParser.cpp
Removed:
################################################################################
diff --git a/llvm/lib/TableGen/TGParser.cpp b/llvm/lib/TableGen/TGParser.cpp
index 6935f6e6d438ad..c9d623031fa44b 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<BinOpInit>(NewName))
NewName = BinOp->Fold(&CurRec);
More information about the llvm-commits
mailing list