Changed AsmWriterOperand to also include the index of the
[oota-llvm.git] / utils / TableGen / AsmWriterInst.cpp
index ccf39c4c9a74c12618ee6377ef0a60a0cf3a1c48..508e4530d09c2d6944cfe8e5c223a6112380d28a 100644 (file)
@@ -219,7 +219,10 @@ AsmWriterInst::AsmWriterInst(const CodeGenInstruction &CGI,
       
       if (VarName.empty()) {
         // Just a modifier, pass this into PrintSpecial.
-        Operands.push_back(AsmWriterOperand("PrintSpecial", ~0U, Modifier));
+        Operands.push_back(AsmWriterOperand("PrintSpecial", 
+                                            ~0U, 
+                                            ~0U, 
+                                            Modifier));
       } else {
         // Otherwise, normal operand.
         unsigned OpNo = CGI.getOperandNamed(VarName);
@@ -227,7 +230,9 @@ AsmWriterInst::AsmWriterInst(const CodeGenInstruction &CGI,
         
         if (CurVariant == Variant || CurVariant == ~0U) {
           unsigned MIOp = OpInfo.MIOperandNo;
-          Operands.push_back(AsmWriterOperand(OpInfo.PrinterMethodName, MIOp,
+          Operands.push_back(AsmWriterOperand(OpInfo.PrinterMethodName, 
+                                              OpNo,
+                                              MIOp,
                                               Modifier));
         }
       }