summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-05-17 23:58:53 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-05-17 23:58:53 +0000
commita92b2b38fffc0e0c35e761d450a52c50a7ea3a9d (patch)
tree7d31a2ccd07dc78c1b3e8527de4b1a5946d1ce2b /llvm/lib/CodeGen/MachineBasicBlock.cpp
parent07aa66887c772745f80d9216c515fc0562507ff2 (diff)
downloadbcm5719-llvm-a92b2b38fffc0e0c35e761d450a52c50a7ea3a9d.tar.gz
bcm5719-llvm-a92b2b38fffc0e0c35e761d450a52c50a7ea3a9d.zip
Move isSuccessor() offline, change it to use std::find.
llvm-svn: 37190
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineBasicBlock.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp
index 39780350ded..44f7f90a65b 100644
--- a/llvm/lib/CodeGen/MachineBasicBlock.cpp
+++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp
@@ -192,3 +192,9 @@ void MachineBasicBlock::removePredecessor(MachineBasicBlock *pred) {
assert(I != Predecessors.end() && "Pred is not a predecessor of this block!");
Predecessors.erase(I);
}
+
+bool MachineBasicBlock::isSuccessor(MachineBasicBlock *MBB) const {
+ std::vector<MachineBasicBlock *>::const_iterator I =
+ std::find(Successors.begin(), Successors.end(), MBB);
+ return I != Successors.end();
+}
OpenPOWER on IntegriCloud