diff options
author | Chris Lattner <sabre@nondot.org> | 2002-09-10 23:54:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-09-10 23:54:58 +0000 |
commit | 5f45ca443e6b62f535d87c19ee35e1b03902900f (patch) | |
tree | 0a564c4ab6ff996a1c9779f101229d25195e13a0 /llvm/lib/VMCore/iBranch.cpp | |
parent | 4ecbe74c2758ebebd7a5d4bd95d2b3eb132fa234 (diff) | |
download | bcm5719-llvm-5f45ca443e6b62f535d87c19ee35e1b03902900f.tar.gz bcm5719-llvm-5f45ca443e6b62f535d87c19ee35e1b03902900f.zip |
Add convenience ctor to BranchInst
llvm-svn: 3676
Diffstat (limited to 'llvm/lib/VMCore/iBranch.cpp')
-rw-r--r-- | llvm/lib/VMCore/iBranch.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/iBranch.cpp b/llvm/lib/VMCore/iBranch.cpp index 1561c3b7095..3ad36d13ee2 100644 --- a/llvm/lib/VMCore/iBranch.cpp +++ b/llvm/lib/VMCore/iBranch.cpp @@ -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)); |