//===- llvm/SandboxIR/Type.h - Classes for handling data types --*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This is a thin wrapper over llvm::Type. // //===----------------------------------------------------------------------===// #ifndef LLVM_SANDBOXIR_TYPE_H #define LLVM_SANDBOXIR_TYPE_H #include "llvm/ADT/SmallPtrSet.h" #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/Type.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" namespace llvm::sandboxir { class Context; // Forward declare friend classes for MSVC. class PointerType; class VectorType; class FixedVectorType; class ScalableVectorType; class IntegerType; class FunctionType; class ArrayType; class StructType; #define DEF_INSTR … #define DEF_CONST … #include "llvm/SandboxIR/SandboxIRValues.def" /// Just like llvm::Type these are immutable, unique, never get freed and can /// only be created via static factory methods. class Type { … }; class PointerType : public Type { … }; class ArrayType : public Type { … }; class StructType : public Type { … }; class VectorType : public Type { … }; class FixedVectorType : public VectorType { … }; class ScalableVectorType : public VectorType { … }; class FunctionType : public Type { … }; /// Class to represent integer types. Note that this class is also used to /// represent the built-in integer types: Int1Ty, Int8Ty, Int16Ty, Int32Ty and /// Int64Ty. /// Integer representation type class IntegerType : public Type { … }; } // namespace llvm::sandboxir #endif // LLVM_SANDBOXIR_TYPE_H