The assert() should reference to machine instr operand number, too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116243 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach 2010-10-11 21:41:31 +00:00
parent af72684eea
commit a1e2194f03

View File

@ -160,10 +160,10 @@ void CodeEmitterGen::run(raw_ostream &o) {
// order. // order.
unsigned OpIdx; unsigned OpIdx;
if (CGI.hasOperandNamed(VarName, OpIdx)) { if (CGI.hasOperandNamed(VarName, OpIdx)) {
assert (!CGI.isFlatOperandNotEmitted(OpIdx) &&
"Explicitly used operand also marked as not emitted!");
// Get the machine operand number for the indicated operand. // Get the machine operand number for the indicated operand.
OpIdx = CGI.OperandList[OpIdx].MIOperandNo; OpIdx = CGI.OperandList[OpIdx].MIOperandNo;
assert (!CGI.isFlatOperandNotEmitted(OpIdx) &&
"Explicitly used operand also marked as not emitted!");
} else { } else {
/// If this operand is not supposed to be emitted by the /// If this operand is not supposed to be emitted by the
/// generated emitter, skip it. /// generated emitter, skip it.