+BranchInst::BranchInst(BasicBlock *IfTrue, Instruction *InsertBefore)
+ : TerminatorInst(Type::VoidTy, Instruction::Br, Ops, 1, InsertBefore) {
+ assert(IfTrue != 0 && "Branch destination may not be null!");
+ Ops[0].init(reinterpret_cast<Value*>(IfTrue), this);
+}
+BranchInst::BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond,
+ Instruction *InsertBefore)
+: TerminatorInst(Type::VoidTy, Instruction::Br, Ops, 3, InsertBefore) {
+ Ops[0].init(reinterpret_cast<Value*>(IfTrue), this);
+ Ops[1].init(reinterpret_cast<Value*>(IfFalse), this);
+ Ops[2].init(Cond, this);
+#ifndef NDEBUG
+ AssertOK();
+#endif
+}
+
+BranchInst::BranchInst(BasicBlock *IfTrue, BasicBlock *InsertAtEnd)
+ : TerminatorInst(Type::VoidTy, Instruction::Br, Ops, 1, InsertAtEnd) {
+ assert(IfTrue != 0 && "Branch destination may not be null!");
+ Ops[0].init(reinterpret_cast<Value*>(IfTrue), this);
+}
+
+BranchInst::BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond,
+ BasicBlock *InsertAtEnd)
+ : TerminatorInst(Type::VoidTy, Instruction::Br, Ops, 3, InsertAtEnd) {
+ Ops[0].init(reinterpret_cast<Value*>(IfTrue), this);
+ Ops[1].init(reinterpret_cast<Value*>(IfFalse), this);
+ Ops[2].init(Cond, this);
+#ifndef NDEBUG
+ AssertOK();
+#endif
+}
+
+