Changed AsmWriterOperand to also include the index of the
operand into the CodeGenInstruction's list of operands,
which is useful for EDEmitter.  (Still working on PR6219)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95759 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/TableGen/AsmWriterInst.h b/utils/TableGen/AsmWriterInst.h
index 5a8cf77..20b8588 100644
--- a/utils/TableGen/AsmWriterInst.h
+++ b/utils/TableGen/AsmWriterInst.h
@@ -41,6 +41,10 @@
     /// into the asm writer.
     std::string Str;
     
+    /// CGIOpNo - For isMachineInstrOperand, this is the index of the operand in
+    /// the CodeGenInstruction.
+    unsigned CGIOpNo;
+    
     /// MiOpNo - For isMachineInstrOperand, this is the operand number of the
     /// machine instruction.
     unsigned MIOpNo;
@@ -56,10 +60,12 @@
                      OpType op = isLiteralTextOperand)
     : OperandType(op), Str(LitStr) {}
     
-    AsmWriterOperand(const std::string &Printer, unsigned OpNo, 
+    AsmWriterOperand(const std::string &Printer,
+                     unsigned _CGIOpNo,
+                     unsigned _MIOpNo,
                      const std::string &Modifier,
                      OpType op = isMachineInstrOperand) 
-    : OperandType(op), Str(Printer), MIOpNo(OpNo),
+    : OperandType(op), Str(Printer), CGIOpNo(_CGIOpNo), MIOpNo(_MIOpNo),
     MiModifier(Modifier) {}
     
     bool operator!=(const AsmWriterOperand &Other) const {