#ifndef LLVM_IR_OPERATOR_H
#define LLVM_IR_OPERATOR_H
#include "llvm/ADT/MapVector.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/FMF.h"
#include "llvm/IR/GEPNoWrapFlags.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Value.h"
#include "llvm/Support/Casting.h"
#include <cstddef>
#include <optional>
namespace llvm {
class Operator : public User { … };
class OverflowingBinaryOperator : public Operator { … };
template <>
struct OperandTraits<OverflowingBinaryOperator>
: public FixedNumOperandTraits<OverflowingBinaryOperator, 2> { … };
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(…)
class PossiblyExactOperator : public Operator { … };
template <>
struct OperandTraits<PossiblyExactOperator>
: public FixedNumOperandTraits<PossiblyExactOperator, 2> { … };
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(…)
class FPMathOperator : public Operator { … };
template<typename SuperClass, unsigned Opc>
class ConcreteOperator : public SuperClass { … };
class AddOperator
: public ConcreteOperator<OverflowingBinaryOperator, Instruction::Add> { … };
class SubOperator
: public ConcreteOperator<OverflowingBinaryOperator, Instruction::Sub> { … };
class MulOperator
: public ConcreteOperator<OverflowingBinaryOperator, Instruction::Mul> { … };
class ShlOperator
: public ConcreteOperator<OverflowingBinaryOperator, Instruction::Shl> { … };
class AShrOperator
: public ConcreteOperator<PossiblyExactOperator, Instruction::AShr> { … };
class LShrOperator
: public ConcreteOperator<PossiblyExactOperator, Instruction::LShr> { … };
class GEPOperator
: public ConcreteOperator<Operator, Instruction::GetElementPtr> { … };
template <>
struct OperandTraits<GEPOperator>
: public VariadicOperandTraits<GEPOperator, 1> { … };
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(…)
class PtrToIntOperator
: public ConcreteOperator<Operator, Instruction::PtrToInt> { … };
template <>
struct OperandTraits<PtrToIntOperator>
: public FixedNumOperandTraits<PtrToIntOperator, 1> { … };
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(…)
class BitCastOperator
: public ConcreteOperator<Operator, Instruction::BitCast> { … };
template <>
struct OperandTraits<BitCastOperator>
: public FixedNumOperandTraits<BitCastOperator, 1> { … };
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(…)
class AddrSpaceCastOperator
: public ConcreteOperator<Operator, Instruction::AddrSpaceCast> { … };
template <>
struct OperandTraits<AddrSpaceCastOperator>
: public FixedNumOperandTraits<AddrSpaceCastOperator, 1> { … };
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(…)
}
#endif