[llvm-commits] CVS: llvm/include/llvm/BasicBlock.h
Chris Lattner
lattner at cs.uiuc.edu
Wed Feb 23 18:37:31 PST 2005
Changes in directory llvm/include/llvm:
BasicBlock.h updated: 1.47 -> 1.48
---
Log message:
add a new method.
---
Diffs of the changes: (+6 -1)
BasicBlock.h | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletion(-)
Index: llvm/include/llvm/BasicBlock.h
diff -u llvm/include/llvm/BasicBlock.h:1.47 llvm/include/llvm/BasicBlock.h:1.48
--- llvm/include/llvm/BasicBlock.h:1.47 Sat Jan 29 18:08:26 2005
+++ llvm/include/llvm/BasicBlock.h Wed Feb 23 20:37:17 2005
@@ -107,7 +107,12 @@
///
void eraseFromParent();
-
+ /// getSinglePredecessor - If this basic block has a single predecessor block,
+ /// return the block, otherwise return a null pointer.
+ BasicBlock *getSinglePredecessor();
+ const BasicBlock *getSinglePredecessor() const {
+ return const_cast<BasicBlock*>(this)->getSinglePredecessor();
+ }
//===--------------------------------------------------------------------===//
/// Instruction iterator methods
More information about the llvm-commits
mailing list