aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/TableGen
diff options
context:
space:
mode:
authorwangpc <wangpengcheng.pp@bytedance.com>2023-07-20 15:16:21 +0800
committerwangpc <wangpengcheng.pp@bytedance.com>2023-07-20 15:24:09 +0800
commitaa84326694f348243d89b55044106e32ca1cf257 (patch)
tree169de6dc0d11f21545bfcb2e88313b9928d0c394 /llvm/lib/TableGen
parent528447ff265a6c58b43af6cff2a3ee0ce5784331 (diff)
downloadllvm-aa84326694f348243d89b55044106e32ca1cf257.zip
llvm-aa84326694f348243d89b55044106e32ca1cf257.tar.gz
llvm-aa84326694f348243d89b55044106e32ca1cf257.tar.bz2
[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.
Diffstat (limited to 'llvm/lib/TableGen')
-rw-r--r--llvm/lib/TableGen/TGParser.cpp5
1 files changed, 0 insertions, 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<BinOpInit>(NewName))
NewName = BinOp->Fold(&CurRec);