[llvm-commits] CVS: llvm/lib/CodeGen/MachineBasicBlock.cpp
Evan Cheng
evan.cheng at apple.com
Thu May 17 16:59:16 PDT 2007
Changes in directory llvm/lib/CodeGen:
MachineBasicBlock.cpp updated: 1.44 -> 1.45
---
Log message:
Move isSuccessor() offline, change it to use std::find.
---
Diffs of the changes: (+6 -0)
MachineBasicBlock.cpp | 6 ++++++
1 files changed, 6 insertions(+)
Index: llvm/lib/CodeGen/MachineBasicBlock.cpp
diff -u llvm/lib/CodeGen/MachineBasicBlock.cpp:1.44 llvm/lib/CodeGen/MachineBasicBlock.cpp:1.45
--- llvm/lib/CodeGen/MachineBasicBlock.cpp:1.44 Mon Apr 30 18:12:53 2007
+++ llvm/lib/CodeGen/MachineBasicBlock.cpp Thu May 17 18:58:53 2007
@@ -192,3 +192,9 @@
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();
+}
More information about the llvm-commits
mailing list