mirror of
https://github.com/RPCSX/llvm.git
synced 2025-03-03 02:17:41 +00:00
Fix MachineInstr::getNumExplicitOperands to count
variadic operands correctly. Patch by Jakob Stoklund Olesen! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69190 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a71c494cd8
commit
9407cd4ede
@ -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…
x
Reference in New Issue
Block a user