mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-28 06:32:09 +00:00
Fix thinkos that Chris caught for me.
Make pred mutators private. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13209 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
76456bc40c
commit
61d3d5c06b
@ -119,10 +119,10 @@ public:
|
||||
/// The Predecessors list of succ is automatically updated.
|
||||
///
|
||||
void addSuccessor (MachineBasicBlock *succ) {
|
||||
Successors.push_back (succ);
|
||||
assert (std::find (Successors.begin (), Successors.end (), succ)
|
||||
== Successors.end ()
|
||||
&& "Trying to addSuccessor a MBB which is already my successor");
|
||||
Successors.push_back (succ);
|
||||
succ->addPredecessor (this);
|
||||
}
|
||||
|
||||
@ -138,15 +138,16 @@ public:
|
||||
Successors.erase (goner);
|
||||
}
|
||||
|
||||
private:
|
||||
/// addPredecessor - Remove pred as a predecessor of this MachineBasicBlock.
|
||||
/// Don't do this unless you know what you're doing, because it doesn't
|
||||
/// update pred's successors list. Use pred->addSuccessor instead.
|
||||
///
|
||||
void addPredecessor (MachineBasicBlock *pred) {
|
||||
Predecessors.push_back (pred);
|
||||
assert(std::find (Predecessors.begin (), Predecessors.end (), pred)
|
||||
== Predecessors.end ()
|
||||
&& "Trying to addPredecessor a MBB which is already my predecessor");
|
||||
Predecessors.push_back (pred);
|
||||
}
|
||||
|
||||
/// removePredecessor - Remove pred as a predecessor of this
|
||||
@ -162,6 +163,7 @@ public:
|
||||
Predecessors.erase (goner);
|
||||
}
|
||||
|
||||
public:
|
||||
/// getFirstTerminator - returns an iterator to the first terminator
|
||||
/// instruction of this basic block. If a terminator does not exist,
|
||||
/// it returns end()
|
||||
|
Loading…
x
Reference in New Issue
Block a user