diff options
author | Sanjay Patel <spatel@rotateright.com> | 2016-04-04 23:05:06 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2016-04-04 23:05:06 +0000 |
commit | e77c7de45956194d4f68296e92d88d6e99f783ba (patch) | |
tree | 1429e2e0678403ae03d72fd44d748b07fd0f081f | |
parent | 0e15a77d40d56489cc317e618658cbefbb4d6902 (diff) | |
download | bcm5719-llvm-e77c7de45956194d4f68296e92d88d6e99f783ba.tar.gz bcm5719-llvm-e77c7de45956194d4f68296e92d88d6e99f783ba.zip |
use range loop; NFCI
llvm-svn: 265360
-rw-r--r-- | llvm/lib/Transforms/Scalar/ConstantProp.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/ConstantProp.cpp b/llvm/lib/Transforms/Scalar/ConstantProp.cpp index c974ebb9456..c2be8de877d 100644 --- a/llvm/lib/Transforms/Scalar/ConstantProp.cpp +++ b/llvm/lib/Transforms/Scalar/ConstantProp.cpp @@ -63,9 +63,9 @@ FunctionPass *llvm::createConstantPropagationPass() { bool ConstantPropagation::runOnFunction(Function &F) { // Initialize the worklist to all of the instructions ready to process... std::set<Instruction*> WorkList; - for(inst_iterator i = inst_begin(F), e = inst_end(F); i != e; ++i) { - WorkList.insert(&*i); - } + for (Instruction &I: instructions(&F)) + WorkList.insert(&I); + bool Changed = false; const DataLayout &DL = F.getParent()->getDataLayout(); TargetLibraryInfo *TLI = |