diff options
author | Chris Lattner <sabre@nondot.org> | 2002-02-05 06:02:59 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-02-05 06:02:59 +0000 |
commit | 2f898d207466bf233b55607e404baca302bc7b5e (patch) | |
tree | e7e8036f6881ebf092db953518b5b15ca9949edc /lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp | |
parent | 748697d2421051b3ff1263d13cccaf410f3e7034 (diff) |
Convert operand iterator over to work like an STL iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1720 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp')
-rw-r--r-- | lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp b/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp index 5205a19182..d06485dc4d 100644 --- a/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp +++ b/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp @@ -187,7 +187,8 @@ MethodLiveVarInfo::getLiveVarSetAfterMInst(const MachineInstr *MI, // machine instruction operand. // static void applyTranferFuncForMInst(ValueSet &LVS, const MachineInstr *MInst) { - for (MachineInstr::val_const_op_iterator OpI(MInst); !OpI.done(); ++OpI) { + for (MachineInstr::const_val_op_iterator OpI = MInst->begin(), + OpE = MInst->end(); OpI != OpE; ++OpI) { if (OpI.isDef()) // kill only if this operand is a def LVS.insert(*OpI); // this definition kills any uses } @@ -198,7 +199,8 @@ static void applyTranferFuncForMInst(ValueSet &LVS, const MachineInstr *MInst) { LVS.erase(MInst->getImplicitRef(i)); } - for (MachineInstr::val_const_op_iterator OpI(MInst); !OpI.done(); ++OpI) { + for (MachineInstr::const_val_op_iterator OpI = MInst->begin(), + OpE = MInst->end(); OpI != OpE; ++OpI) { if (isa<BasicBlock>(*OpI)) continue; // don't process labels if (!OpI.isDef()) // add only if this operand is a use @@ -206,7 +208,7 @@ static void applyTranferFuncForMInst(ValueSet &LVS, const MachineInstr *MInst) { } // do for implicit operands as well - for (unsigned i=0; i < MInst->getNumImplicitRefs(); ++i) { + for (unsigned i = 0; i < MInst->getNumImplicitRefs(); ++i) { if (!MInst->implicitRefIsDefined(i)) LVS.insert(MInst->getImplicitRef(i)); } |