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"
23
24namespace cir {
25
26namespace detail {
28} // namespace detail
29
30bool isValidFundamentalIntWidth(unsigned width);
31
32/// Returns true if the type is a CIR sized type.
33///
34/// Types are sized if they implement SizedTypeInterface and
35/// return true from its method isSized.
36///
37/// Unsized types are those that do not have a size, such as
38/// void, or abstract types.
39bool isSized(mlir::Type ty);
40
41} // namespace cir
42
43//===----------------------------------------------------------------------===//
44// CIR Dialect Tablegen'd Types
45//===----------------------------------------------------------------------===//
46
47namespace cir {
48
49#include "clang/CIR/Dialect/IR/CIRTypeConstraints.h.inc"
50
51} // namespace cir
52
53#define GET_TYPEDEF_CLASSES
54#include "clang/CIR/Dialect/IR/CIROpsTypes.h.inc"
55
56#endif // CLANG_CIR_DIALECT_IR_CIRTYPES_H
Provides definitions for the various language-specific address spaces.
bool isValidFundamentalIntWidth(unsigned width)
Definition CIRTypes.cpp:513
bool isSized(mlir::Type ty)
Returns true if the type is a CIR sized type.
Definition CIRTypes.cpp:25
Type storage for CIR record types.