diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-01-29 00:33:32 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-01-29 00:33:32 +0000 |
| commit | 03adb1aa83ce8c0ed8d444962e3c865b92eecf43 (patch) | |
| tree | c3aaff7bc5d6e4754459bb30fe12e81beabd0040 /llvm | |
| parent | 00b82c25bcb3ee934d7a544813bd9304b613fa6c (diff) | |
| download | bcm5719-llvm-03adb1aa83ce8c0ed8d444962e3c865b92eecf43.tar.gz bcm5719-llvm-03adb1aa83ce8c0ed8d444962e3c865b92eecf43.zip | |
This file is now merged into Instructions.cpp
llvm-svn: 19889
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/VMCore/InstrTypes.cpp | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/llvm/lib/VMCore/InstrTypes.cpp b/llvm/lib/VMCore/InstrTypes.cpp deleted file mode 100644 index 5d0e727ccc6..00000000000 --- a/llvm/lib/VMCore/InstrTypes.cpp +++ /dev/null @@ -1,64 +0,0 @@ -//===-- InstrTypes.cpp - Implement Instruction subclasses -------*- C++ -*-===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -#include "llvm/Instructions.h" -#include "llvm/Function.h" -#include "llvm/SymbolTable.h" -#include "llvm/Constant.h" -#include "llvm/Type.h" -#include <algorithm> // find -using namespace llvm; - -//===----------------------------------------------------------------------===// -// TerminatorInst Class -//===----------------------------------------------------------------------===// - -TerminatorInst::TerminatorInst(Instruction::TermOps iType, Instruction *IB) - : Instruction(Type::VoidTy, iType, "", IB) { -} - -TerminatorInst::TerminatorInst(Instruction::TermOps iType, BasicBlock *IAE) - : Instruction(Type::VoidTy, iType, "", IAE) { -} - - - -//===----------------------------------------------------------------------===// -// PHINode Class -//===----------------------------------------------------------------------===// - -PHINode::PHINode(const PHINode &PN) - : Instruction(PN.getType(), Instruction::PHI) { - Operands.reserve(PN.Operands.size()); - for (unsigned i = 0; i < PN.Operands.size(); i+=2) { - Operands.push_back(Use(PN.Operands[i], this)); - Operands.push_back(Use(PN.Operands[i+1], this)); - } -} - -// removeIncomingValue - Remove an incoming value. This is useful if a -// predecessor basic block is deleted. -Value *PHINode::removeIncomingValue(unsigned Idx, bool DeletePHIIfEmpty) { - assert(Idx*2 < Operands.size() && "BB not in PHI node!"); - Value *Removed = Operands[Idx*2]; - Operands.erase(Operands.begin()+Idx*2, // Erase Value and BasicBlock - Operands.begin()+Idx*2+2); - - // If the PHI node is dead, because it has zero entries, nuke it now. - if (getNumOperands() == 0 && DeletePHIIfEmpty) { - // If anyone is using this PHI, make them use a dummy value instead... - replaceAllUsesWith(Constant::getNullValue(getType())); - getParent()->getInstList().erase(this); - } - return Removed; -} |

