[llvm-commits] [llvm] r96891 - /llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
Chris Lattner
sabre at nondot.org
Mon Feb 22 21:59:11 PST 2010
Author: lattner
Date: Mon Feb 22 23:59:10 2010
New Revision: 96891
URL: http://llvm.org/viewvc/llvm-project?rev=96891&view=rev
Log:
more tidying up
Modified:
llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=96891&r1=96890&r2=96891&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Mon Feb 22 23:59:10 2010
@@ -1579,10 +1579,10 @@
if (TPN->ContainsUnresolvedType()) {
if (iter == 0)
throw "Value #" + utostr(i) + " of PredicateOperand '" +
- DefaultOps[iter][i]->getName() + "' doesn't have a concrete type!";
+ DefaultOps[iter][i]->getName() +"' doesn't have a concrete type!";
else
throw "Value #" + utostr(i) + " of OptionalDefOperand '" +
- DefaultOps[iter][i]->getName() + "' doesn't have a concrete type!";
+ DefaultOps[iter][i]->getName() +"' doesn't have a concrete type!";
}
DefaultOpInfo.DefaultOps.push_back(TPN);
}
@@ -1626,21 +1626,21 @@
TreePatternNode *&Slot = InstInputs[Pat->getName()];
if (!Slot) {
Slot = Pat;
+ return true;
+ }
+ Record *SlotRec;
+ if (Slot->isLeaf()) {
+ SlotRec = dynamic_cast<DefInit*>(Slot->getLeafValue())->getDef();
} else {
- Record *SlotRec;
- if (Slot->isLeaf()) {
- SlotRec = dynamic_cast<DefInit*>(Slot->getLeafValue())->getDef();
- } else {
- assert(Slot->getNumChildren() == 0 && "can't be a use with children!");
- SlotRec = Slot->getOperator();
- }
-
- // Ensure that the inputs agree if we've already seen this input.
- if (Rec != SlotRec)
- I->error("All $" + Pat->getName() + " inputs must agree with each other");
- if (Slot->getExtTypes() != Pat->getExtTypes())
- I->error("All $" + Pat->getName() + " inputs must agree with each other");
+ assert(Slot->getNumChildren() == 0 && "can't be a use with children!");
+ SlotRec = Slot->getOperator();
}
+
+ // Ensure that the inputs agree if we've already seen this input.
+ if (Rec != SlotRec)
+ I->error("All $" + Pat->getName() + " inputs must agree with each other");
+ if (Slot->getExtTypes() != Pat->getExtTypes())
+ I->error("All $" + Pat->getName() + " inputs must agree with each other");
return true;
}
More information about the llvm-commits
mailing list