aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/InstrTypes.h39
-rw-r--r--include/llvm/Instruction.h3
-rw-r--r--include/llvm/iOperators.h11
-rw-r--r--lib/VMCore/iOperators.cpp20
4 files changed, 2 insertions, 71 deletions
diff --git a/include/llvm/InstrTypes.h b/include/llvm/InstrTypes.h
index 1d3bae6c7d..6f71710e84 100644
--- a/include/llvm/InstrTypes.h
+++ b/include/llvm/InstrTypes.h
@@ -54,45 +54,6 @@ public:
//===----------------------------------------------------------------------===//
-// UnaryOperator Class
-//===----------------------------------------------------------------------===//
-
-class UnaryOperator : public Instruction {
-protected:
- UnaryOperator(Value *S, UnaryOps iType, const std::string &Name = "")
- : Instruction(S->getType(), iType, Name) {
- Operands.reserve(1);
- Operands.push_back(Use(S, this));
- }
-public:
-
- // create() - Construct a unary instruction, given the opcode
- // and its operand.
- //
- static UnaryOperator *create(UnaryOps Op, Value *Source,
- const std::string &Name = "");
-
- inline UnaryOps getOpcode() const {
- return (UnaryOps)Instruction::getOpcode();
- }
-
- virtual Instruction *clone() const {
- return create(getOpcode(), Operands[0]);
- }
-
- // Methods for support type inquiry through isa, cast, and dyn_cast:
- static inline bool classof(const UnaryOperator *) { return true; }
- static inline bool classof(const Instruction *I) {
- return I->getOpcode() >= FirstUnaryOp && I->getOpcode() < NumUnaryOps;
- }
- static inline bool classof(const Value *V) {
- return isa<Instruction>(V) && classof(cast<Instruction>(V));
- }
-};
-
-
-
-//===----------------------------------------------------------------------===//
// BinaryOperator Class
//===----------------------------------------------------------------------===//
diff --git a/include/llvm/Instruction.h b/include/llvm/Instruction.h
index 2e5bcdaed2..41be312853 100644
--- a/include/llvm/Instruction.h
+++ b/include/llvm/Instruction.h
@@ -68,9 +68,6 @@ public:
inline bool isTerminator() const { // Instance of TerminatorInst?
return iType >= FirstTermOp && iType < NumTermOps;
}
- inline bool isUnaryOp() const {
- return iType >= FirstUnaryOp && iType < NumUnaryOps;
- }
inline bool isBinaryOp() const {
return iType >= FirstBinaryOp && iType < NumBinaryOps;
}
diff --git a/include/llvm/iOperators.h b/include/llvm/iOperators.h
index f9fc88ac41..ba64b0faec 100644
--- a/include/llvm/iOperators.h
+++ b/include/llvm/iOperators.h
@@ -10,17 +10,6 @@
#include "llvm/InstrTypes.h"
//===----------------------------------------------------------------------===//
-// Class to represent Unary operators
-//===----------------------------------------------------------------------===//
-//
-class GenericUnaryInst : public UnaryOperator {
-public:
- GenericUnaryInst(UnaryOps Opcode, Value *S1, const std::string &Name = "")
- : UnaryOperator(S1, Opcode, Name) {
- }
-};
-
-//===----------------------------------------------------------------------===//
// Classes to represent Binary operators
//===----------------------------------------------------------------------===//
//
diff --git a/lib/VMCore/iOperators.cpp b/lib/VMCore/iOperators.cpp
index f520ff52f5..5b8c26a0d1 100644
--- a/lib/VMCore/iOperators.cpp
+++ b/lib/VMCore/iOperators.cpp
@@ -1,28 +1,12 @@
-//===-- iOperators.cpp - Implement the Binary & Unary Operators --*- C++ -*--=//
+//===-- iOperators.cpp - Implement binary Operators ------------*- C++ -*--===//
//
-// This file implements the nontrivial binary & unary operator instructions.
+// This file implements the nontrivial binary operator instructions.
//
//===----------------------------------------------------------------------===//
#include "llvm/iOperators.h"
#include "llvm/Type.h"
#include "llvm/Constants.h"
-using std::cerr;
-
-//===----------------------------------------------------------------------===//
-// UnaryOperator Class
-//===----------------------------------------------------------------------===//
-
-UnaryOperator *UnaryOperator::create(UnaryOps Op, Value *Source,
- const std::string &Name) {
- switch (Op) {
- case Not: return new GenericUnaryInst(Op, Source, Name);
- default:
- cerr << "Don't know how to Create UnaryOperator " << Op << "\n";
- return 0;
- }
-}
-
//===----------------------------------------------------------------------===//
// BinaryOperator Class