[llvm-commits] CVS: llvm/lib/VMCore/iBranch.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Sep 10 18:56:05 PDT 2002
Changes in directory llvm/lib/VMCore:
iBranch.cpp updated: 1.6 -> 1.7
---
Log message:
Add convenience ctor to BranchInst
---
Diffs of the changes:
Index: llvm/lib/VMCore/iBranch.cpp
diff -u llvm/lib/VMCore/iBranch.cpp:1.6 llvm/lib/VMCore/iBranch.cpp:1.7
--- llvm/lib/VMCore/iBranch.cpp:1.6 Tue Sep 10 10:45:53 2002
+++ llvm/lib/VMCore/iBranch.cpp Tue Sep 10 18:54:58 2002
@@ -26,6 +26,13 @@
"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));
More information about the llvm-commits
mailing list