Add a constified getLandingPad() method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149303 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling 2012-01-31 00:26:24 +00:00
parent a1a8a323f4
commit 7750c3fc9f
2 changed files with 4 additions and 0 deletions

View File

@ -268,6 +268,7 @@ public:
/// getLandingPadInst() - Return the landingpad instruction associated with /// getLandingPadInst() - Return the landingpad instruction associated with
/// the landing pad. /// the landing pad.
LandingPadInst *getLandingPadInst(); LandingPadInst *getLandingPadInst();
const LandingPadInst *getLandingPadInst() const;
private: private:
/// AdjustBlockAddressRefCount - BasicBlock stores the number of BlockAddress /// AdjustBlockAddressRefCount - BasicBlock stores the number of BlockAddress

View File

@ -366,3 +366,6 @@ bool BasicBlock::isLandingPad() const {
LandingPadInst *BasicBlock::getLandingPadInst() { LandingPadInst *BasicBlock::getLandingPadInst() {
return dyn_cast<LandingPadInst>(getFirstNonPHI()); return dyn_cast<LandingPadInst>(getFirstNonPHI());
} }
const LandingPadInst *BasicBlock::getLandingPadInst() const {
return dyn_cast<LandingPadInst>(getFirstNonPHI());
}