mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Fix MachineInstr::getNumExplicitOperands to count
variadic operands correctly. Patch by Jakob Stoklund Olesen! llvm-svn: 69190
This commit is contained in:
parent
c4bf4ef9cc
commit
420019a18a
@ -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