diff --git a/include/llvm/iTerminators.h b/include/llvm/iTerminators.h index 7cf14ac1150..56132eeb677 100644 --- a/include/llvm/iTerminators.h +++ b/include/llvm/iTerminators.h @@ -311,6 +311,9 @@ struct UnwindInst : public TerminatorInst { UnwindInst(Instruction *InsertBefore = 0) : TerminatorInst(Instruction::Unwind, InsertBefore) { } + UnwindInst(BasicBlock *InsertAtEnd) + : TerminatorInst(Instruction::Unwind, InsertAtEnd) { + } virtual Instruction *clone() const { return new UnwindInst(); } @@ -319,9 +322,7 @@ struct UnwindInst : public TerminatorInst { abort(); return 0; } - virtual void setSuccessor(unsigned idx, BasicBlock *NewSucc) { - assert(0 && "UnwindInst has no successors!"); - } + virtual void setSuccessor(unsigned idx, BasicBlock *NewSucc); virtual unsigned getNumSuccessors() const { return 0; } // Methods for support type inquiry through isa, cast, and dyn_cast: diff --git a/lib/VMCore/iBranch.cpp b/lib/VMCore/iBranch.cpp index 1a169c6d0ef..78951b2965d 100644 --- a/lib/VMCore/iBranch.cpp +++ b/lib/VMCore/iBranch.cpp @@ -23,7 +23,10 @@ void ReturnInst::setSuccessor(unsigned idx, BasicBlock *NewSucc) { assert(0 && "ReturnInst has no successors!"); } - +// Likewise for UnwindInst +void UnwindInst::setSuccessor(unsigned idx, BasicBlock *NewSucc) { + assert(0 && "UnwindInst has no successors!"); +} BranchInst::BranchInst(BasicBlock *True, BasicBlock *False, Value *Cond, Instruction *InsertBefore)