mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Use range based for loops to avoid needing to re-mention SmallPtrSet size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216351 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user