User defined operators are not supposed to live beyond the lifetime of the
[oota-llvm.git] / lib / VMCore / iBranch.cpp
index 1561c3b7095df7fb413d7a6bf52d1f4602ff1e98..3ad36d13ee2adedfd9cf3cec21e6b53315a97f1e 100644 (file)
@@ -26,6 +26,13 @@ BranchInst::BranchInst(BasicBlock *True, BasicBlock *False, Value *Cond,
          "May only branch on boolean predicates!!!!");
 }
 
+BranchInst::BranchInst(BasicBlock *True, Instruction *InsertBefore) 
+  : TerminatorInst(Instruction::Br, InsertBefore) {
+  assert(True != 0 && "True branch destination may not be null!!!");
+  Operands.reserve(1);
+  Operands.push_back(Use(True, this));
+}
+
 BranchInst::BranchInst(const BranchInst &BI) : TerminatorInst(Instruction::Br) {
   Operands.reserve(BI.Operands.size());
   Operands.push_back(Use(BI.Operands[0], this));