Simplify code, eliminating the need for the X86 isVoid target instr flag

llvm-svn: 7534
This commit is contained in:
Chris Lattner 2003-08-03 21:51:45 +00:00
parent 74e4e9b44f
commit 41a894de77
1 changed files with 4 additions and 3 deletions

View File

@ -126,10 +126,11 @@ MachineInstr::SetMachineOperandReg(unsigned i,
operands[i].value = NULL;
operands[i].regNum = regNum;
if (isdef || TargetInstrDescriptors[opCode].resultPos == (int) i)
if (isdef || TargetInstrDescriptors[opCode].resultPos == (int)i) {
assert(operands[i].flags == MachineOperand::DEFONLYFLAG &&
"Shouldn't be changing a register type once set!");
operands[i].flags = MachineOperand::DEFONLYFLAG;
else
operands[i].flags = 0;
}
insertUsedReg(regNum);
}