mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-29 14:40:25 +00:00
Added setSuccessor() method to terminator instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2784 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a3b8867861
commit
0bdbfe0b15
@ -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);
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user