aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/iSwitch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore/iSwitch.cpp')
-rw-r--r--lib/VMCore/iSwitch.cpp50
1 files changed, 0 insertions, 50 deletions
diff --git a/lib/VMCore/iSwitch.cpp b/lib/VMCore/iSwitch.cpp
deleted file mode 100644
index 1998b7fde5..0000000000
--- a/lib/VMCore/iSwitch.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-//===-- iSwitch.cpp - Implement the Switch instruction --------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file implements the Switch instruction...
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/Instructions.h"
-#include "llvm/BasicBlock.h"
-using namespace llvm;
-
-void SwitchInst::init(Value *Value, BasicBlock *Default)
-{
- assert(Value && Default);
- Operands.push_back(Use(Value, this));
- Operands.push_back(Use(Default, this));
-}
-
-SwitchInst::SwitchInst(const SwitchInst &SI)
- : TerminatorInst(Instruction::Switch) {
- Operands.reserve(SI.Operands.size());
-
- for (unsigned i = 0, E = SI.Operands.size(); i != E; i+=2) {
- Operands.push_back(Use(SI.Operands[i], this));
- Operands.push_back(Use(SI.Operands[i+1], this));
- }
-}
-
-/// addCase - Add an entry to the switch instruction...
-///
-void SwitchInst::addCase(Constant *OnVal, BasicBlock *Dest) {
- Operands.push_back(Use((Value*)OnVal, this));
- Operands.push_back(Use((Value*)Dest, this));
-}
-
-/// removeCase - This method removes the specified successor from the switch
-/// instruction. Note that this cannot be used to remove the default
-/// destination (successor #0).
-///
-void SwitchInst::removeCase(unsigned idx) {
- assert(idx != 0 && "Cannot remove the default case!");
- assert(idx*2 < Operands.size() && "Successor index out of range!!!");
- Operands.erase(Operands.begin()+idx*2, Operands.begin()+(idx+1)*2);
-}