llvm.org GIT mirror llvm / add2ebd
[llvm-exegesis] YamlContext: fix some missing spaces/quotes/newlines in error strings git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358077 91177308-0d34-0410-b5e6-96231b3b80d8 Roman Lebedev 1 year, 7 months ago
1 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
6464 llvm::SmallVector Pieces;
6565 String.split(Pieces, " ", /* MaxSplit */ -1, /* KeepEmpty */ false);
6666 if (Pieces.empty()) {
67 ErrorStream << "Unknown Instruction: '" << String << "'";
67 ErrorStream << "Unknown Instruction: '" << String << "'\n";
6868 return;
6969 }
7070 bool ProcessOpcode = true;
8484 llvm::StringRef getRegName(unsigned RegNo) {
8585 const llvm::StringRef RegName = State->getRegInfo().getName(RegNo);
8686 if (RegName.empty())
87 ErrorStream << "No register with enum value" << RegNo;
87 ErrorStream << "No register with enum value '" << RegNo << "'\n";
8888 return RegName;
8989 }
9090
9292 auto Iter = RegNameToRegNo.find(RegName);
9393 if (Iter != RegNameToRegNo.end())
9494 return Iter->second;
95 ErrorStream << "No register with name " << RegName;
95 ErrorStream << "No register with name '" << RegName << "'\n";
9696 return 0;
9797 }
9898
144144 if (unsigned RegNo = getRegNo(String))
145145 return llvm::MCOperand::createReg(RegNo);
146146 if (String != kInvalidOperand)
147 ErrorStream << "Unknown Operand: '" << String << "'";
147 ErrorStream << "Unknown Operand: '" << String << "'\n";
148148 return {};
149149 }
150150
151151 llvm::StringRef getInstrName(unsigned InstrNo) {
152152 const llvm::StringRef InstrName = State->getInstrInfo().getName(InstrNo);
153153 if (InstrName.empty())
154 ErrorStream << "No opcode with enum value" << InstrNo;
154 ErrorStream << "No opcode with enum value '" << InstrNo << "'\n";
155155 return InstrName;
156156 }
157157
159159 auto Iter = OpcodeNameToOpcodeIdx.find(InstrName);
160160 if (Iter != OpcodeNameToOpcodeIdx.end())
161161 return Iter->second;
162 ErrorStream << "No opcode with name " << InstrName;
162 ErrorStream << "No opcode with name '" << InstrName << "'\n";
163163 return 0;
164164 }
165165