summaryrefslogtreecommitdiff
path: root/include/llvm/Instructions.h
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-07-28 02:15:52 +0000
committerBill Wendling <isanbard@gmail.com>2011-07-28 02:15:52 +0000
commit7f66c45f35bdfc69c41f2e1b3b9891a4eca0c0b0 (patch)
treea2af1ad9657ca1d9a6b3ef5b512af19544fc8dce /include/llvm/Instructions.h
parent15d03fb7f496562d7256ecac69f63e08ee0bfd2e (diff)
downloadllvm-7f66c45f35bdfc69c41f2e1b3b9891a4eca0c0b0.tar.gz
llvm-7f66c45f35bdfc69c41f2e1b3b9891a4eca0c0b0.tar.bz2
llvm-7f66c45f35bdfc69c41f2e1b3b9891a4eca0c0b0.tar.xz
Add a couple of convenience functions:
* InvokeInst: Get the landingpad instruction associated with this invoke. * LandingPadInst: A method to reserve extra space for clauses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136325 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Instructions.h')
-rw-r--r--include/llvm/Instructions.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index d337002e0b..82d58162f6 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -1870,6 +1870,10 @@ public:
/// getNumClauses - Get the number of clauses for this landing pad.
unsigned getNumClauses() const { return getNumOperands() - 1; }
+ /// reserveClauses - Grow the size of the operand list to accomodate the new
+ /// number of clauses.
+ void reserveClauses(unsigned Size);
+
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const LandingPadInst *) { return true; }
static inline bool classof(const Instruction *I) {
@@ -2474,6 +2478,10 @@ public:
Op<-1>() = reinterpret_cast<Value*>(B);
}
+ // getLandingPad - Get the landingpad instruction from the landing pad block
+ // (the unwind destination).
+ LandingPadInst *getLandingPad() const;
+
BasicBlock *getSuccessor(unsigned i) const {
assert(i < 2 && "Successor # out of range for invoke!");
return i == 0 ? getNormalDest() : getUnwindDest();