1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00

force all instruction operands to be named.

llvm-svn: 23358
This commit is contained in:
Chris Lattner 2005-09-14 21:13:50 +00:00
parent cd5eeef9ee
commit 9c196b02fa
2 changed files with 5 additions and 5 deletions

View File

@ -285,8 +285,11 @@ CodeGenInstruction::CodeGenInstruction(Record *R, const std::string &AsmStr)
throw "Unknown operand class '" + Rec->getName() +
"' in instruction '" + R->getName() + "' instruction!";
if (!DI->getArgName(i).empty() &&
!OperandNames.insert(DI->getArgName(i)).second)
// Check that the operand has a name and that it's unique.
if (DI->getArgName(i).empty())
throw "In instruction '" + R->getName() + "', operand #" + utostr(i) +
" has no name!";
if (!OperandNames.insert(DI->getArgName(i)).second)
throw "In instruction '" + R->getName() + "', operand #" + utostr(i) +
" has the same name as a previous operand!";

View File

@ -788,10 +788,7 @@ void DAGISelEmitter::ParseAndResolveInstructions() {
if (i == CGI.OperandList.size())
I->error("'" + InstResults.begin()->first +
"' set but does not appear in operand list!");
const std::string &OpName = CGI.OperandList[i].Name;
if (OpName.empty())
I->error("Operand #" + utostr(i) + " in operands list has no name!");
// Check that it exists in InstResults.
Record *R = InstResults[OpName];