summaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/PHITransAddr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Analysis/PHITransAddr.cpp')
-rw-r--r--llvm/lib/Analysis/PHITransAddr.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/PHITransAddr.cpp b/llvm/lib/Analysis/PHITransAddr.cpp
index 1a02497f25c3..e42113db4278 100644
--- a/llvm/lib/Analysis/PHITransAddr.cpp
+++ b/llvm/lib/Analysis/PHITransAddr.cpp
@@ -17,6 +17,7 @@
#include "llvm/IR/Constants.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Instructions.h"
+#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
@@ -215,8 +216,8 @@ Value *PHITransAddr::translateSubExpr(Value *V, BasicBlock *CurBB,
if (Value *V = simplifyGEPInst(GEP->getSourceElementType(), GEPOps[0],
ArrayRef<Value *>(GEPOps).slice(1),
GEP->getNoWrapFlags(), {DL, TLI, DT, AC})) {
- for (unsigned i = 0, e = GEPOps.size(); i != e; ++i)
- RemoveInstInputs(GEPOps[i], InstInputs);
+ for (Value *Op : GEPOps)
+ RemoveInstInputs(Op, InstInputs);
return addAsInput(V);
}