[SimplifyLibCalls] Use range-based loop. No functional change.
authorDavide Italiano <davide@freebsd.org>
Tue, 27 Oct 2015 04:17:51 +0000 (04:17 +0000)
committerDavide Italiano <davide@freebsd.org>
Tue, 27 Oct 2015 04:17:51 +0000 (04:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251383 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/SimplifyLibCalls.cpp

index f5a7fe6..c8dd4aa 100644 (file)
@@ -1427,10 +1427,8 @@ LibCallSimplifier::classifyArgUse(Value *Val, BasicBlock *BB, bool IsFloat,
 
 void LibCallSimplifier::replaceTrigInsts(SmallVectorImpl<CallInst *> &Calls,
                                          Value *Res) {
-  for (SmallVectorImpl<CallInst *>::iterator I = Calls.begin(), E = Calls.end();
-       I != E; ++I) {
-    replaceAllUsesWith(*I, Res);
-  }
+  for (CallInst *C : Calls)
+    replaceAllUsesWith(C, Res);
 }
 
 void insertSinCosCall(IRBuilder<> &B, Function *OrigCallee, Value *Arg,