[llvm-commits] [llvm] r149303 - in /llvm/trunk: include/llvm/BasicBlock.h lib/VMCore/BasicBlock.cpp
Bill Wendling
isanbard at gmail.com
Mon Jan 30 16:26:24 PST 2012
Author: void
Date: Mon Jan 30 18:26:24 2012
New Revision: 149303
URL: http://llvm.org/viewvc/llvm-project?rev=149303&view=rev
Log:
Add a constified getLandingPad() method.
Modified:
llvm/trunk/include/llvm/BasicBlock.h
llvm/trunk/lib/VMCore/BasicBlock.cpp
Modified: llvm/trunk/include/llvm/BasicBlock.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/BasicBlock.h?rev=149303&r1=149302&r2=149303&view=diff
==============================================================================
--- llvm/trunk/include/llvm/BasicBlock.h (original)
+++ llvm/trunk/include/llvm/BasicBlock.h Mon Jan 30 18:26:24 2012
@@ -268,6 +268,7 @@
/// getLandingPadInst() - Return the landingpad instruction associated with
/// the landing pad.
LandingPadInst *getLandingPadInst();
+ const LandingPadInst *getLandingPadInst() const;
private:
/// AdjustBlockAddressRefCount - BasicBlock stores the number of BlockAddress
Modified: llvm/trunk/lib/VMCore/BasicBlock.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/BasicBlock.cpp?rev=149303&r1=149302&r2=149303&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/BasicBlock.cpp (original)
+++ llvm/trunk/lib/VMCore/BasicBlock.cpp Mon Jan 30 18:26:24 2012
@@ -366,3 +366,6 @@
LandingPadInst *BasicBlock::getLandingPadInst() {
return dyn_cast<LandingPadInst>(getFirstNonPHI());
}
+const LandingPadInst *BasicBlock::getLandingPadInst() const {
+ return dyn_cast<LandingPadInst>(getFirstNonPHI());
+}
More information about the llvm-commits
mailing list