Add a constified getLandingPad() method.

llvm-svn: 149303
This commit is contained in:
Bill Wendling 2012-01-31 00:26:24 +00:00
parent 9aca3b0d2f
commit bd7ed6fe7c
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());
}