diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-08-24 23:23:06 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-08-24 23:23:06 +0000 |
commit | 4627679cece264a966faa82a7c5bb79f273d5b6e (patch) | |
tree | 227f40fbf1eb4d5208e75d3eb98ba20e829feaa6 /llvm/tools/bugpoint/CrashDebugger.cpp | |
parent | 085fc4d6c679055fc603650e7d29579b262e11a8 (diff) | |
download | bcm5719-llvm-4627679cece264a966faa82a7c5bb79f273d5b6e.tar.gz bcm5719-llvm-4627679cece264a966faa82a7c5bb79f273d5b6e.zip |
Use range based for loops to avoid needing to re-mention SmallPtrSet size.
llvm-svn: 216351
Diffstat (limited to 'llvm/tools/bugpoint/CrashDebugger.cpp')
-rw-r--r-- | llvm/tools/bugpoint/CrashDebugger.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/llvm/tools/bugpoint/CrashDebugger.cpp b/llvm/tools/bugpoint/CrashDebugger.cpp index 8bd61b3c096..60d4123c184 100644 --- a/llvm/tools/bugpoint/CrashDebugger.cpp +++ b/llvm/tools/bugpoint/CrashDebugger.cpp @@ -312,10 +312,9 @@ bool ReduceCrashingBlocks::TestBlocks(std::vector<const BasicBlock*> &BBs) { // have to take. std::vector<std::pair<std::string, std::string> > BlockInfo; - for (SmallPtrSet<BasicBlock*, 8>::iterator I = Blocks.begin(), - E = Blocks.end(); I != E; ++I) - BlockInfo.push_back(std::make_pair((*I)->getParent()->getName(), - (*I)->getName())); + for (BasicBlock *BB : Blocks) + BlockInfo.push_back(std::make_pair(BB->getParent()->getName(), + BB->getName())); // Now run the CFG simplify pass on the function... std::vector<std::string> Passes; @@ -420,9 +419,8 @@ bool ReduceCrashingInstructions::TestInsts(std::vector<const Instruction*> // Make sure to use instruction pointers that point into the now-current // module, and that they don't include any deleted blocks. Insts.clear(); - for (SmallPtrSet<Instruction*, 64>::const_iterator I = Instructions.begin(), - E = Instructions.end(); I != E; ++I) - Insts.push_back(*I); + for (Instruction *Inst : Instructions) + Insts.push_back(Inst); return true; } delete M; // It didn't crash, try something else. |