Changed AsmWriterOperand to also include the index of the
[oota-llvm.git] / utils / TableGen / AsmWriterInst.h
index 7ea69ce27bd09cfed76ab62e103fb317e6fc3807..20b8588862b746ffb2d06b05056bba1e6108c4fb 100644 (file)
@@ -41,6 +41,10 @@ namespace llvm {
     /// 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 @@ namespace llvm {
                      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 {
@@ -81,7 +87,10 @@ namespace llvm {
     std::vector<AsmWriterOperand> Operands;
     const CodeGenInstruction *CGI;
     
-    AsmWriterInst(const CodeGenInstruction &CGI, Record *AsmWriter);
+    AsmWriterInst(const CodeGenInstruction &CGI, 
+                  unsigned Variant,
+                  int FirstOperandColumn,
+                  int OperandSpacing);
     
     /// MatchesAllButOneOp - If this instruction is exactly identical to the
     /// specified instruction except for one differing operand, return the