[TableGen] Eliminate dead code in ParseForeachDeclaration [NFC]
authorPaul C. Anagnostopoulos <paul@windfall.com>
Tue, 8 Jun 2021 15:51:53 +0000 (11:51 -0400)
committerPaul C. Anagnostopoulos <paul@windfall.com>
Thu, 10 Jun 2021 14:34:44 +0000 (10:34 -0400)
Differential Revision: https://reviews.llvm.org/D103904

llvm/lib/TableGen/TGParser.cpp

index cae0306..ed79630 100644 (file)
@@ -2787,10 +2787,7 @@ VarInit *TGParser::ParseForeachDeclaration(Init *&ForeachListValue) {
       break;
     }
 
-    std::string Type;
-    if (TI)
-      Type = (Twine("' of type '") + TI->getType()->getAsString()).str();
-    Error(ValueLoc, "expected a list, got '" + I->getAsString() + Type + "'");
+    Error(ValueLoc, "expected a list, got '" + I->getAsString() + "'");
     if (CurMultiClass) {
       PrintNote({}, "references to multiclass template arguments cannot be "
                 "resolved at this time");