[llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Sep 14 15:06:47 PDT 2005



Changes in directory llvm/utils/TableGen:

DAGISelEmitter.cpp updated: 1.23 -> 1.24
---
Log message:

catch unnamed inputs


---
Diffs of the changes:  (+9 -1)

 DAGISelEmitter.cpp |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletion(-)


Index: llvm/utils/TableGen/DAGISelEmitter.cpp
diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.23 llvm/utils/TableGen/DAGISelEmitter.cpp:1.24
--- llvm/utils/TableGen/DAGISelEmitter.cpp:1.23	Wed Sep 14 16:59:34 2005
+++ llvm/utils/TableGen/DAGISelEmitter.cpp	Wed Sep 14 17:06:36 2005
@@ -631,7 +631,15 @@
 static void HandleUse(TreePattern *I, TreePatternNode *Pat,
                       std::map<std::string, TreePatternNode*> &InstInputs) {
   // No name -> not interesting.
-  if (Pat->getName().empty()) return;
+  if (Pat->getName().empty()) {
+    if (Pat->isLeaf()) {
+      DefInit *DI = dynamic_cast<DefInit*>(Pat->getLeafValue());
+      if (DI && DI->getDef()->isSubClassOf("RegisterClass"))
+        I->error("Input " + DI->getDef()->getName() + " must be named!");
+
+    }
+    return;
+  }
 
   Record *Rec;
   if (Pat->isLeaf()) {






More information about the llvm-commits mailing list