mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
MC CFG: Don't insert preds/succs again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188874 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3ec498faad
commit
dca54eab53
@ -37,7 +37,8 @@ MCBasicBlock::MCBasicBlock(const MCTextAtom &Insts, MCFunction *Parent)
|
||||
{}
|
||||
|
||||
void MCBasicBlock::addSuccessor(const MCBasicBlock *MCBB) {
|
||||
Successors.push_back(MCBB);
|
||||
if (!isSuccessor(MCBB))
|
||||
Successors.push_back(MCBB);
|
||||
}
|
||||
|
||||
bool MCBasicBlock::isSuccessor(const MCBasicBlock *MCBB) const {
|
||||
@ -46,7 +47,8 @@ bool MCBasicBlock::isSuccessor(const MCBasicBlock *MCBB) const {
|
||||
}
|
||||
|
||||
void MCBasicBlock::addPredecessor(const MCBasicBlock *MCBB) {
|
||||
Predecessors.push_back(MCBB);
|
||||
if (!isPredecessor(MCBB))
|
||||
Predecessors.push_back(MCBB);
|
||||
}
|
||||
|
||||
bool MCBasicBlock::isPredecessor(const MCBasicBlock *MCBB) const {
|
||||
|
Loading…
Reference in New Issue
Block a user