summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeGenTarget.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-09-14 21:13:50 +0000
committerChris Lattner <sabre@nondot.org>2005-09-14 21:13:50 +0000
commit3ced3f8b82822571657b00d5e2701dccbe2015cf (patch)
treeedd4b2fdf54e83d153450fe0bd9b9f6a53771b06 /llvm/utils/TableGen/CodeGenTarget.cpp
parent9e4a4ee3dc3fd9f76cf2e627ac1bd34d904dd43f (diff)
downloadbcm5719-llvm-3ced3f8b82822571657b00d5e2701dccbe2015cf.tar.gz
bcm5719-llvm-3ced3f8b82822571657b00d5e2701dccbe2015cf.zip
force all instruction operands to be named.
llvm-svn: 23358
Diffstat (limited to 'llvm/utils/TableGen/CodeGenTarget.cpp')
-rw-r--r--llvm/utils/TableGen/CodeGenTarget.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/CodeGenTarget.cpp b/llvm/utils/TableGen/CodeGenTarget.cpp
index c18dff351f1..f0fdeae9456 100644
--- a/llvm/utils/TableGen/CodeGenTarget.cpp
+++ b/llvm/utils/TableGen/CodeGenTarget.cpp
@@ -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!";
OpenPOWER on IntegriCloud