[llvm-commits] CVS: llvm/utils/TableGen/CodeGenTarget.cpp DAGISelEmitter.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Sep 14 14:14:02 PDT 2005
Changes in directory llvm/utils/TableGen:
CodeGenTarget.cpp updated: 1.38 -> 1.39
DAGISelEmitter.cpp updated: 1.21 -> 1.22
---
Log message:
force all instruction operands to be named.
---
Diffs of the changes: (+5 -5)
CodeGenTarget.cpp | 7 +++++--
DAGISelEmitter.cpp | 3 ---
2 files changed, 5 insertions(+), 5 deletions(-)
Index: llvm/utils/TableGen/CodeGenTarget.cpp
diff -u llvm/utils/TableGen/CodeGenTarget.cpp:1.38 llvm/utils/TableGen/CodeGenTarget.cpp:1.39
--- llvm/utils/TableGen/CodeGenTarget.cpp:1.38 Wed Sep 14 16:05:02 2005
+++ llvm/utils/TableGen/CodeGenTarget.cpp Wed Sep 14 16:13:50 2005
@@ -285,8 +285,11 @@
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!";
Index: llvm/utils/TableGen/DAGISelEmitter.cpp
diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.21 llvm/utils/TableGen/DAGISelEmitter.cpp:1.22
--- llvm/utils/TableGen/DAGISelEmitter.cpp:1.21 Wed Sep 14 16:04:12 2005
+++ llvm/utils/TableGen/DAGISelEmitter.cpp Wed Sep 14 16:13:50 2005
@@ -788,10 +788,7 @@
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];
More information about the llvm-commits
mailing list