add a new method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20293 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2005-02-24 02:37:26 +00:00
parent 00aaadf9f0
commit ad993cbb77
2 changed files with 16 additions and 1 deletions

View File

@@ -107,7 +107,12 @@ public:
///
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