OSDN Git Service

Add a constified getLandingPad() method.
authorBill Wendling <isanbard@gmail.com>
Tue, 31 Jan 2012 00:26:24 +0000 (00:26 +0000)
committerBill Wendling <isanbard@gmail.com>
Tue, 31 Jan 2012 00:26:24 +0000 (00:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149303 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/BasicBlock.h
lib/VMCore/BasicBlock.cpp

index da4f921..d2aa167 100644 (file)
@@ -268,6 +268,7 @@ public:
   /// getLandingPadInst() - Return the landingpad instruction associated with
   /// the landing pad.
   LandingPadInst *getLandingPadInst();
+  const LandingPadInst *getLandingPadInst() const;
 
 private:
   /// AdjustBlockAddressRefCount - BasicBlock stores the number of BlockAddress
index d0aa275..d353b0a 100644 (file)
@@ -366,3 +366,6 @@ bool BasicBlock::isLandingPad() const {
 LandingPadInst *BasicBlock::getLandingPadInst() {
   return dyn_cast<LandingPadInst>(getFirstNonPHI());
 }
+const LandingPadInst *BasicBlock::getLandingPadInst() const {
+  return dyn_cast<LandingPadInst>(getFirstNonPHI());
+}