clang 22.0.0git
CIRTypes.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file declares the types in the CIR dialect.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef CLANG_CIR_DIALECT_IR_CIRTYPES_H
14#define CLANG_CIR_DIALECT_IR_CIRTYPES_H
15
16#include "mlir/IR/BuiltinAttributes.h"
17#include "mlir/IR/Types.h"
18#include "mlir/Interfaces/DataLayoutInterfaces.h"
20
21namespace cir {
22
23namespace detail {
25} // namespace detail
26
27bool isValidFundamentalIntWidth(unsigned width);
28
29/// Returns true if the type is a CIR sized type.
30///
31/// Types are sized if they implement SizedTypeInterface and
32/// return true from its method isSized.
33///
34/// Unsized types are those that do not have a size, such as
35/// void, or abstract types.
36bool isSized(mlir::Type ty);
37
38} // namespace cir
39
40//===----------------------------------------------------------------------===//
41// CIR Dialect Tablegen'd Types
42//===----------------------------------------------------------------------===//
43
44namespace cir {
45
46#include "clang/CIR/Dialect/IR/CIRTypeConstraints.h.inc"
47
48} // namespace cir
49
50#define GET_TYPEDEF_CLASSES
51#include "clang/CIR/Dialect/IR/CIROpsTypes.h.inc"
52
53#endif // CLANG_CIR_DIALECT_IR_CIRTYPES_H
bool isValidFundamentalIntWidth(unsigned width)
Definition CIRTypes.cpp:475
bool isSized(mlir::Type ty)
Returns true if the type is a CIR sized type.
Definition CIRTypes.cpp:24
Type storage for CIR record types.