Pull predecessor and successor iterators out of the CFG*.h files, and plop them into

the BasicBlock class where they should be.  pred_begin/pred_end become methods on BasicBlock,
and the cfg namespace isn't used anymore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@691 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2001-10-01 13:19:53 +00:00
parent 711774e169
commit f0604b84c7
16 changed files with 176 additions and 368 deletions

View File

@@ -264,7 +264,7 @@ BasicBlock *ADCE::fixupCFG(BasicBlock *BB, set<BasicBlock*> &VisitedBlocks,
}
// Recursively traverse successors of this basic block.
cfg::succ_iterator SI = cfg::succ_begin(BB), SE = cfg::succ_end(BB);
BasicBlock::succ_iterator SI = BB->succ_begin(), SE = BB->succ_end();
for (; SI != SE; ++SI) {
BasicBlock *Succ = *SI;
BasicBlock *Repl = fixupCFG(Succ, VisitedBlocks, AliveBlocks);
@@ -278,7 +278,7 @@ BasicBlock *ADCE::fixupCFG(BasicBlock *BB, set<BasicBlock*> &VisitedBlocks,
BasicBlock *ReturnBB = 0; // Default to nothing live down here
// Recursively traverse successors of this basic block.
cfg::succ_iterator SI = cfg::succ_begin(BB), SE = cfg::succ_end(BB);
BasicBlock::succ_iterator SI = BB->succ_begin(), SE = BB->succ_end();
for (; SI != SE; ++SI) {
BasicBlock *RetBB = fixupCFG(*SI, VisitedBlocks, AliveBlocks);
if (RetBB) {