forked from OSchip/llvm-project
Fix MachineInstr::getNumExplicitOperands to count
variadic operands correctly. Patch by Jakob Stoklund Olesen! llvm-svn: 69190
This commit is contained in:
parent
e20a2e5fa3
commit
37608532c4
|
@ -623,8 +623,8 @@ unsigned MachineInstr::getNumExplicitOperands() const {
|
|||
if (!TID->isVariadic())
|
||||
return NumOperands;
|
||||
|
||||
for (unsigned e = getNumOperands(); NumOperands != e; ++NumOperands) {
|
||||
const MachineOperand &MO = getOperand(NumOperands);
|
||||
for (unsigned i = NumOperands, e = getNumOperands(); i != e; ++i) {
|
||||
const MachineOperand &MO = getOperand(i);
|
||||
if (!MO.isReg() || !MO.isImplicit())
|
||||
NumOperands++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue