2001-06-06 20:29:01 +00:00
|
|
|
//===-- llvm/iBinary.h - Binary Operator node definitions --------*- C++ -*--=//
|
|
|
|
//
|
|
|
|
// This file contains the declarations of all of the Binary Operator classes.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_IBINARY_H
|
|
|
|
#define LLVM_IBINARY_H
|
|
|
|
|
|
|
|
#include "llvm/InstrTypes.h"
|
|
|
|
|
2001-07-08 04:57:15 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Class to represent Unary operators
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
class GenericUnaryInst : public UnaryOperator {
|
|
|
|
public:
|
|
|
|
GenericUnaryInst(UnaryOps Opcode, Value *S1, const Type *ResultTy = 0,
|
|
|
|
const string &Name = "")
|
|
|
|
: UnaryOperator(S1, Opcode, ResultTy, Name) {
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual const char *getOpcodeName() const;
|
|
|
|
};
|
|
|
|
|
2001-06-06 20:29:01 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Classes to represent Binary operators
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// All of these classes are subclasses of the BinaryOperator class...
|
|
|
|
//
|
|
|
|
|
2001-06-27 23:28:50 +00:00
|
|
|
class GenericBinaryInst : public BinaryOperator {
|
2001-06-06 20:29:01 +00:00
|
|
|
public:
|
2001-07-07 20:17:23 +00:00
|
|
|
GenericBinaryInst(BinaryOps Opcode, Value *S1, Value *S2,
|
2001-07-07 19:24:15 +00:00
|
|
|
const string &Name = "")
|
2001-06-27 23:28:50 +00:00
|
|
|
: BinaryOperator(Opcode, S1, S2, Name) {
|
2001-06-06 20:29:01 +00:00
|
|
|
}
|
|
|
|
|
2001-07-07 19:24:15 +00:00
|
|
|
virtual const char *getOpcodeName() const;
|
2001-06-06 20:29:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class SetCondInst : public BinaryOperator {
|
|
|
|
BinaryOps OpType;
|
|
|
|
public:
|
|
|
|
SetCondInst(BinaryOps opType, Value *S1, Value *S2,
|
|
|
|
const string &Name = "");
|
|
|
|
|
2001-07-07 19:24:15 +00:00
|
|
|
virtual const char *getOpcodeName() const;
|
2001-06-06 20:29:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|