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 | 62815d96727768b3bd3178929b3912ecde65c6a2 (patch) | |
tree | 3f2e697ff06847e546020883a15000980ce3697d /lib/VMCore | |
parent | 9531c50c756f6eafd6d33c03017b25ab1f9e08dd (diff) | |
download | external_llvm-62815d96727768b3bd3178929b3912ecde65c6a2.zip external_llvm-62815d96727768b3bd3178929b3912ecde65c6a2.tar.gz external_llvm-62815d96727768b3bd3178929b3912ecde65c6a2.tar.bz2 |
Add convenience ctor to BranchInst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3676 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/iBranch.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/VMCore/iBranch.cpp b/lib/VMCore/iBranch.cpp index 1561c3b..3ad36d1 100644 --- a/lib/VMCore/iBranch.cpp +++ b/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)); |