99e4bf33bacee0ea0e6e3596892749f6df8bd7eb
[oota-llvm.git] / include / llvm / iOperators.h
1 //===-- llvm/iBinary.h - Binary Operator node definitions --------*- C++ -*--=//
2 //
3 // This file contains the declarations of all of the Binary Operator classes.
4 //
5 //===----------------------------------------------------------------------===//
6
7 #ifndef LLVM_IBINARY_H
8 #define LLVM_IBINARY_H
9
10 #include "llvm/InstrTypes.h"
11
12 //===----------------------------------------------------------------------===//
13 //                 Classes to represent Binary operators
14 //===----------------------------------------------------------------------===//
15 //
16 // All of these classes are subclasses of the BinaryOperator class...
17 //
18
19 class GenericBinaryInst : public BinaryOperator {
20   const char *OpcodeString;
21 public:
22   GenericBinaryInst(unsigned Opcode, Value *S1, Value *S2, 
23                     const char *OpcodeStr, const string &Name = "")
24     : BinaryOperator(Opcode, S1, S2, Name) {
25     OpcodeString = OpcodeStr;
26   }
27
28   virtual string getOpcode() const { return OpcodeString; }
29 };
30
31 class SetCondInst : public BinaryOperator {
32   BinaryOps OpType;
33 public:
34   SetCondInst(BinaryOps opType, Value *S1, Value *S2, 
35               const string &Name = "");
36
37   virtual string getOpcode() const;
38 };
39
40 #endif