diff options
| author | Chris Lattner <sabre@nondot.org> | 2002-09-10 15:45:53 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2002-09-10 15:45:53 +0000 |
| commit | 2aa831120c97fa4725aea97b0b3e67e8d95b4f38 (patch) | |
| tree | cd3d5fb5804f89f0b810198075909f8694107616 /lib/VMCore/iSwitch.cpp | |
| parent | 6e65cda0ec32ad446e1405e21fef52107d996961 (diff) | |
Add capability to insert an instruction into a basic block immediately after
it is created, as part of the ctor call.
Eliminate the GenericBinaryInst class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3653 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/iSwitch.cpp')
| -rw-r--r-- | lib/VMCore/iSwitch.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/VMCore/iSwitch.cpp b/lib/VMCore/iSwitch.cpp index 402610cded..a63adfdfcf 100644 --- a/lib/VMCore/iSwitch.cpp +++ b/lib/VMCore/iSwitch.cpp @@ -7,11 +7,12 @@ #include "llvm/iTerminators.h" #include "llvm/BasicBlock.h" -SwitchInst::SwitchInst(Value *V, BasicBlock *DefDest) - : TerminatorInst(Instruction::Switch) { - assert(V && DefDest); +SwitchInst::SwitchInst(Value *V, BasicBlock *DefaultDest, + Instruction *InsertBefore) + : TerminatorInst(Instruction::Switch, InsertBefore) { + assert(V && DefaultDest); Operands.push_back(Use(V, this)); - Operands.push_back(Use(DefDest, this)); + Operands.push_back(Use(DefaultDest, this)); } SwitchInst::SwitchInst(const SwitchInst &SI) |
