Somehow I forgot poor little UnwindInst
authorChris Lattner <sabre@nondot.org>
Thu, 20 Nov 2003 18:11:56 +0000 (18:11 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 20 Nov 2003 18:11:56 +0000 (18:11 +0000)
*sniff*

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10108 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/iTerminators.h
lib/VMCore/iBranch.cpp

index 7cf14ac11500aefba185739cf97d7e5fd9576042..56132eeb677efcdac932b63671e3a8876e09adf4 100644 (file)
@@ -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:
index 1a169c6d0ef27dbfa4ee9248ab5922f721883306..78951b2965d09bec000ee0d1d96e57da4945ae2a 100644 (file)
@@ -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)