aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/IR/BasicBlock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/IR/BasicBlock.h')
-rw-r--r--include/llvm/IR/BasicBlock.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/llvm/IR/BasicBlock.h b/include/llvm/IR/BasicBlock.h
index 7c7dd2c..185fc29 100644
--- a/include/llvm/IR/BasicBlock.h
+++ b/include/llvm/IR/BasicBlock.h
@@ -82,8 +82,8 @@ private:
void setParent(Function *parent);
friend class SymbolTableListTraits<BasicBlock, Function>;
- BasicBlock(const BasicBlock &) LLVM_DELETED_FUNCTION;
- void operator=(const BasicBlock &) LLVM_DELETED_FUNCTION;
+ BasicBlock(const BasicBlock &) = delete;
+ void operator=(const BasicBlock &) = delete;
/// \brief Constructor.
///
@@ -208,6 +208,14 @@ public:
return const_cast<BasicBlock*>(this)->getUniquePredecessor();
}
+ /// Return the successor of this block if it has a unique successor.
+ /// Otherwise return a null pointer. This method is analogous to
+ /// getUniquePredeccessor above.
+ BasicBlock *getUniqueSuccessor();
+ const BasicBlock *getUniqueSuccessor() const {
+ return const_cast<BasicBlock*>(this)->getUniqueSuccessor();
+ }
+
//===--------------------------------------------------------------------===//
/// Instruction iterator methods
///