Change instruction description to split OperandList into OutOperandList and
[oota-llvm.git] / utils / TableGen / DAGISelEmitter.cpp
index fcad31858703e8085a6799043ca878ab7ff6d624..e8049d6baf52fdf17b69a922e6bb06d2b983ab22 100644 (file)
@@ -1171,7 +1171,12 @@ void DAGISelEmitter::ParsePatternFragments(std::ostream &OS) {
     // Parse the operands list.
     DagInit *OpsList = Fragments[i]->getValueAsDag("Operands");
     DefInit *OpsOp = dynamic_cast<DefInit*>(OpsList->getOperator());
-    if (!OpsOp || OpsOp->getDef()->getName() != "ops")
+    // Special cases: ops == outs == ins. Different names are used to
+    // improve readibility.
+    if (!OpsOp ||
+        (OpsOp->getDef()->getName() != "ops" &&
+         OpsOp->getDef()->getName() != "outs" &&
+         OpsOp->getDef()->getName() != "ins"))
       P->error("Operands list should start with '(ops ... '!");
     
     // Copy over the arguments.