mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
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:
@@ -10,7 +10,6 @@
|
||||
#include "llvm/Method.h"
|
||||
#include "llvm/SymbolTable.h"
|
||||
#include "llvm/Type.h"
|
||||
#include "llvm/CFG.h"
|
||||
#include "llvm/iOther.h"
|
||||
#include "llvm/CodeGen/MachineInstr.h"
|
||||
|
||||
@@ -91,12 +90,11 @@ bool BasicBlock::hasConstantPoolReferences() const {
|
||||
// called while the predecessor still refers to this block.
|
||||
//
|
||||
void BasicBlock::removePredecessor(BasicBlock *Pred) {
|
||||
using cfg::pred_begin; using cfg::pred_end; using cfg::pred_iterator;
|
||||
assert(find(pred_begin(this), pred_end(this), Pred) != pred_end(this) &&
|
||||
assert(find(pred_begin(), pred_end(), Pred) != pred_end() &&
|
||||
"removePredecessor: BB is not a predecessor!");
|
||||
if (!front()->isPHINode()) return; // Quick exit.
|
||||
|
||||
pred_iterator PI(pred_begin(this)), EI(pred_end(this));
|
||||
pred_iterator PI(pred_begin()), EI(pred_end());
|
||||
unsigned max_idx;
|
||||
|
||||
// Loop over the rest of the predecessors until we run out, or until we find
|
||||
|
Reference in New Issue
Block a user