[PATCH] D102151: [TableGen] Remove redundant `Error:` in msg (NFC)

ksyx via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 10 00:44:54 PDT 2021


ksyx created this revision.
ksyx added a reviewer: Paul-C-Anagnostopoulos.
ksyx requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Since calling `PrintFatalError` will automatically add `error: ` prefix in the message printed, there is no need having an extra `ERROR:` prefix in the argument passed.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D102151

Files:
  llvm/utils/TableGen/CodeGenTarget.cpp
  llvm/utils/TableGen/ExegesisEmitter.cpp


Index: llvm/utils/TableGen/ExegesisEmitter.cpp
===================================================================
--- llvm/utils/TableGen/ExegesisEmitter.cpp
+++ llvm/utils/TableGen/ExegesisEmitter.cpp
@@ -98,9 +98,9 @@
     : Records(RK), PfmCounterNameTable(collectPfmCounters(RK)) {
   std::vector<Record *> Targets = Records.getAllDerivedDefinitions("Target");
   if (Targets.size() == 0)
-    PrintFatalError("ERROR: No 'Target' subclasses defined!");
+    PrintFatalError("No 'Target' subclasses defined!");
   if (Targets.size() != 1)
-    PrintFatalError("ERROR: Multiple subclasses of Target defined!");
+    PrintFatalError("Multiple subclasses of Target defined!");
   Target = std::string(Targets[0]->getName());
 }
 
Index: llvm/utils/TableGen/CodeGenTarget.cpp
===================================================================
--- llvm/utils/TableGen/CodeGenTarget.cpp
+++ llvm/utils/TableGen/CodeGenTarget.cpp
@@ -251,9 +251,9 @@
   : Records(records), CGH(records) {
   std::vector<Record*> Targets = Records.getAllDerivedDefinitions("Target");
   if (Targets.size() == 0)
-    PrintFatalError("ERROR: No 'Target' subclasses defined!");
+    PrintFatalError("No 'Target' subclasses defined!");
   if (Targets.size() != 1)
-    PrintFatalError("ERROR: Multiple subclasses of Target defined!");
+    PrintFatalError("Multiple subclasses of Target defined!");
   TargetRec = Targets[0];
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102151.343979.patch
Type: text/x-patch
Size: 1408 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210510/d9adcad0/attachment.bin>


More information about the llvm-commits mailing list