if (SExt->getType() != ConsideredSExtType)
return false;
- for (Value::const_use_iterator UseIt = SExt->use_begin(),
- EndUseIt = SExt->use_end();
- UseIt != EndUseIt; ++UseIt) {
- if (isa<GetElementPtrInst>(*UseIt))
+ for (const Use &U : SExt->uses()) {
+ if (isa<GetElementPtrInst>(*U))
return true;
}
bool insert = false;
// #1.
- for (Value::use_iterator UseIt = SExt->use_begin(),
- EndUseIt = SExt->use_end();
- UseIt != EndUseIt; ++UseIt) {
- const Instruction *Inst = dyn_cast<GetElementPtrInst>(*UseIt);
+ for (const Use &U : SExt->uses()) {
+ const Instruction *Inst = dyn_cast<GetElementPtrInst>(U);
if (Inst && Inst->getNumOperands() > 2) {
DEBUG(dbgs() << "Interesting use in GetElementPtrInst\n" << *Inst
<< '\n');