diff options
author | Chris Lattner <sabre@nondot.org> | 2005-09-14 21:13:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-09-14 21:13:50 +0000 |
commit | c4a8b73ab3aa97d03a919a642469b81e334b6903 (patch) | |
tree | 5bec2097ca7c698817d64087b273086da596d183 /utils/TableGen/CodeGenTarget.cpp | |
parent | 2e3f5db9ff9de3402e5d0d463199b9df9f13a19f (diff) |
force all instruction operands to be named.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23358 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenTarget.cpp')
-rw-r--r-- | utils/TableGen/CodeGenTarget.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp index c18dff351f..f0fdeae945 100644 --- a/utils/TableGen/CodeGenTarget.cpp +++ b/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!"; |