diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/InstrTypes.h | 4 | ||||
-rw-r--r-- | include/llvm/iTerminators.h | 8 |
2 files changed, 11 insertions, 1 deletions
diff --git a/include/llvm/InstrTypes.h b/include/llvm/InstrTypes.h index f7d63d6..8b5b390 100644 --- a/include/llvm/InstrTypes.h +++ b/include/llvm/InstrTypes.h @@ -35,7 +35,9 @@ public: // virtual const BasicBlock *getSuccessor(unsigned idx) const = 0; virtual unsigned getNumSuccessors() const = 0; - virtual void setSuccessor(unsigned idx, BasicBlock *NewSucc) = 0; + + //set a successor at a given index + virtual void setSuccessor(unsigned idx, BasicBlock *B) = 0; inline BasicBlock *getSuccessor(unsigned idx) { return (BasicBlock*)((const TerminatorInst *)this)->getSuccessor(idx); diff --git a/include/llvm/iTerminators.h b/include/llvm/iTerminators.h index 482684a..b17029b 100644 --- a/include/llvm/iTerminators.h +++ b/include/llvm/iTerminators.h @@ -233,6 +233,14 @@ public: return cast<BasicBlock>(Operands[2].get()); } + inline void setNormalDest(BasicBlock *B){ + Operands[1] = (Value*)B; + } + + inline void setExceptionalDest(BasicBlock *B){ + Operands[2] = (Value*)B; + } + virtual const char *getOpcodeName() const { return "invoke"; } virtual const BasicBlock *getSuccessor(unsigned i) const { |