[llvm] r358077 - [llvm-exegesis] YamlContext: fix some missing spaces/quotes/newlines in error strings

Roman Lebedev via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 10 05:20:14 PDT 2019


Author: lebedevri
Date: Wed Apr 10 05:20:14 2019
New Revision: 358077

URL: http://llvm.org/viewvc/llvm-project?rev=358077&view=rev
Log:
[llvm-exegesis] YamlContext: fix some missing spaces/quotes/newlines in error strings

Modified:
    llvm/trunk/tools/llvm-exegesis/lib/BenchmarkResult.cpp

Modified: llvm/trunk/tools/llvm-exegesis/lib/BenchmarkResult.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-exegesis/lib/BenchmarkResult.cpp?rev=358077&r1=358076&r2=358077&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-exegesis/lib/BenchmarkResult.cpp (original)
+++ llvm/trunk/tools/llvm-exegesis/lib/BenchmarkResult.cpp Wed Apr 10 05:20:14 2019
@@ -65,7 +65,7 @@ struct YamlContext {
     llvm::SmallVector<llvm::StringRef, 16> Pieces;
     String.split(Pieces, " ", /* MaxSplit */ -1, /* KeepEmpty */ false);
     if (Pieces.empty()) {
-      ErrorStream << "Unknown Instruction: '" << String << "'";
+      ErrorStream << "Unknown Instruction: '" << String << "'\n";
       return;
     }
     bool ProcessOpcode = true;
@@ -85,7 +85,7 @@ struct YamlContext {
   llvm::StringRef getRegName(unsigned RegNo) {
     const llvm::StringRef RegName = State->getRegInfo().getName(RegNo);
     if (RegName.empty())
-      ErrorStream << "No register with enum value" << RegNo;
+      ErrorStream << "No register with enum value '" << RegNo << "'\n";
     return RegName;
   }
 
@@ -93,7 +93,7 @@ struct YamlContext {
     auto Iter = RegNameToRegNo.find(RegName);
     if (Iter != RegNameToRegNo.end())
       return Iter->second;
-    ErrorStream << "No register with name " << RegName;
+    ErrorStream << "No register with name '" << RegName << "'\n";
     return 0;
   }
 
@@ -145,14 +145,14 @@ private:
     if (unsigned RegNo = getRegNo(String))
       return llvm::MCOperand::createReg(RegNo);
     if (String != kInvalidOperand)
-      ErrorStream << "Unknown Operand: '" << String << "'";
+      ErrorStream << "Unknown Operand: '" << String << "'\n";
     return {};
   }
 
   llvm::StringRef getInstrName(unsigned InstrNo) {
     const llvm::StringRef InstrName = State->getInstrInfo().getName(InstrNo);
     if (InstrName.empty())
-      ErrorStream << "No opcode with enum value" << InstrNo;
+      ErrorStream << "No opcode with enum value '" << InstrNo << "'\n";
     return InstrName;
   }
 
@@ -160,7 +160,7 @@ private:
     auto Iter = OpcodeNameToOpcodeIdx.find(InstrName);
     if (Iter != OpcodeNameToOpcodeIdx.end())
       return Iter->second;
-    ErrorStream << "No opcode with name " << InstrName;
+    ErrorStream << "No opcode with name '" << InstrName << "'\n";
     return 0;
   }
 




More information about the llvm-commits mailing list