From: Bill Wendling Date: Tue, 31 Jan 2012 00:26:24 +0000 (+0000) Subject: Add a constified getLandingPad() method. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=7750c3fc9f1dc47fce14c5dbb6c17bf5b52f3ba1;p=oota-llvm.git Add a constified getLandingPad() method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149303 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/BasicBlock.h b/include/llvm/BasicBlock.h index da4f92100d0..d2aa1673d92 100644 --- a/include/llvm/BasicBlock.h +++ b/include/llvm/BasicBlock.h @@ -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 diff --git a/lib/VMCore/BasicBlock.cpp b/lib/VMCore/BasicBlock.cpp index d0aa275c8fe..d353b0adcff 100644 --- a/lib/VMCore/BasicBlock.cpp +++ b/lib/VMCore/BasicBlock.cpp @@ -366,3 +366,6 @@ bool BasicBlock::isLandingPad() const { LandingPadInst *BasicBlock::getLandingPadInst() { return dyn_cast(getFirstNonPHI()); } +const LandingPadInst *BasicBlock::getLandingPadInst() const { + return dyn_cast(getFirstNonPHI()); +}