OSDN Git Service

Update aosp/master LLVM for rebase to r239765
[android-x86/external-llvm.git] / include / llvm / IR / BasicBlock.h
index a71946e..66581bf 100644 (file)
@@ -116,6 +116,7 @@ public:
   ///
   /// Note: this is undefined behavior if the block does not have a parent.
   const Module *getModule() const;
+  Module *getModule();
 
   /// \brief Returns the terminator instruction if the block is well formed or
   /// null if the block is not well formed.
@@ -206,9 +207,19 @@ 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.
+  /// \brief Return the successor of this block if it has a single successor.
+  /// Otherwise return a null pointer.
+  ///
+  /// This method is analogous to getSinglePredecessor above.
+  BasicBlock *getSingleSuccessor();
+  const BasicBlock *getSingleSuccessor() const {
+    return const_cast<BasicBlock*>(this)->getSingleSuccessor();
+  }
+
+  /// \brief Return the successor of this block if it has a unique successor.
+  /// Otherwise return a null pointer.
+  ///
+  /// This method is analogous to getUniquePredecessor above.
   BasicBlock *getUniqueSuccessor();
   const BasicBlock *getUniqueSuccessor() const {
     return const_cast<BasicBlock*>(this)->getUniqueSuccessor();