Add convenience ctor to BranchInst
[oota-llvm.git] / lib / VMCore / InstrTypes.cpp
index d167669edd8be8758047a32c339f73218a9f55da..b53f480b14861580f28236a94d55ca7e410f1288 100644 (file)
@@ -1,4 +1,4 @@
-//===-- InstrTypes.cpp - Implement Instruction subclasses --------*- C++ -*--=//
+//===-- InstrTypes.cpp - Implement Instruction subclasses -------*- C++ -*-===//
 //
 // This file implements 
 //
 //                            TerminatorInst Class
 //===----------------------------------------------------------------------===//
 
-TerminatorInst::TerminatorInst(Instruction::TermOps iType) 
-  : Instruction(Type::VoidTy, iType, "") {
+TerminatorInst::TerminatorInst(Instruction::TermOps iType, Instruction *IB
+  : Instruction(Type::VoidTy, iType, "", IB) {
 }
 
-TerminatorInst::TerminatorInst(const Type *Ty, Instruction::TermOps iType,
-                              const std::string &Name = "")
-  : Instruction(Ty, iType, Name) {
-}
-
-
 //===----------------------------------------------------------------------===//
 //                               PHINode Class
 //===----------------------------------------------------------------------===//
 
-PHINode::PHINode(const Type *Ty, const std::string &name) 
-  : Instruction(Ty, Instruction::PHINode, name) {
-}
-
-PHINode::PHINode(const PHINode &PN) 
+PHINode::PHINode(const PHINode &PN)
   : Instruction(PN.getType(), Instruction::PHINode) {
   Operands.reserve(PN.Operands.size());
   for (unsigned i = 0; i < PN.Operands.size(); i+=2) {