diff options
author | Anand Shukla <ashukla@cs.uiuc.edu> | 2002-06-25 20:17:40 +0000 |
---|---|---|
committer | Anand Shukla <ashukla@cs.uiuc.edu> | 2002-06-25 20:17:40 +0000 |
commit | 0bdbfe0b158859c62d1d1cf21fac31c95cbd1174 (patch) | |
tree | d129cfa2f398571b2a2ba7c9040f5b05b1293058 /include | |
parent | a3b8867861addc82b8253e5d7733e68e55302711 (diff) | |
download | external_llvm-0bdbfe0b158859c62d1d1cf21fac31c95cbd1174.zip external_llvm-0bdbfe0b158859c62d1d1cf21fac31c95cbd1174.tar.gz external_llvm-0bdbfe0b158859c62d1d1cf21fac31c95cbd1174.tar.bz2 |
Added setSuccessor() method to terminator instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2784 91177308-0d34-0410-b5e6-96231b3b80d8
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 { |