1 //===-- llvm/iBinary.h - Binary Operator node definitions --------*- C++ -*--=//
3 // This file contains the declarations of all of the Binary Operator classes.
5 //===----------------------------------------------------------------------===//
10 #include "llvm/InstrTypes.h"
12 //===----------------------------------------------------------------------===//
13 // Classes to represent Binary operators
14 //===----------------------------------------------------------------------===//
16 // All of these classes are subclasses of the BinaryOperator class...
19 class AddInst : public BinaryOperator {
21 AddInst(Value *S1, Value *S2, const string &Name = "")
22 : BinaryOperator(Instruction::Add, S1, S2, Name) {
25 virtual string getOpcode() const { return "add"; }
29 class SubInst : public BinaryOperator {
31 SubInst(Value *S1, Value *S2, const string &Name = "")
32 : BinaryOperator(Instruction::Sub, S1, S2, Name) {
35 virtual string getOpcode() const { return "sub"; }
39 class SetCondInst : public BinaryOperator {
42 SetCondInst(BinaryOps opType, Value *S1, Value *S2,
43 const string &Name = "");
45 virtual string getOpcode() const;