aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveVariables.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/LiveVariables.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveVariables.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/LiveVariables.cpp b/llvm/lib/CodeGen/LiveVariables.cpp
index 547e9a9..905d268 100644
--- a/llvm/lib/CodeGen/LiveVariables.cpp
+++ b/llvm/lib/CodeGen/LiveVariables.cpp
@@ -208,8 +208,7 @@ LiveVariables::FindLastPartialDef(Register Reg,
return nullptr;
PartDefRegs.insert(LastDefReg);
- for (unsigned i = 0, e = LastDef->getNumOperands(); i != e; ++i) {
- MachineOperand &MO = LastDef->getOperand(i);
+ for (MachineOperand &MO : LastDef->operands()) {
if (!MO.isReg() || !MO.isDef() || MO.getReg() == 0)
continue;
Register DefReg = MO.getReg();