fix a bug where we had an implicit assumption that the
result instruction operand numbering matched the result pattern.
Fixing this allows us to move the xchg/test aliases to the .td file.
llvm-svn: 118334
diff --git a/llvm/utils/TableGen/CodeGenInstruction.h b/llvm/utils/TableGen/CodeGenInstruction.h
index 0e636a8..f5b2239 100644
--- a/llvm/utils/TableGen/CodeGenInstruction.h
+++ b/llvm/utils/TableGen/CodeGenInstruction.h
@@ -277,6 +277,11 @@
std::vector<ResultOperand> ResultOperands;
CodeGenInstAlias(Record *R, CodeGenTarget &T);
+
+ /// getResultInstOperandIndexForResultOperandIndex - Given an index into the
+ /// ResultOperands array, translate it to a valid index in ResultInst's
+ /// operand list.
+ unsigned getResultInstOperandIndexForResultOperandIndex(unsigned i) const;
};
}