MLIR 22.0.0git
TypeConversions.h
Go to the documentation of this file.
1//===- TypeConversions.h - Convert signless types into C/C++ types -------===//
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#ifndef MLIR_DIALECT_EMITC_TRANSFORMS_TYPECONVERSIONS_H
10#define MLIR_DIALECT_EMITC_TRANSFORMS_TYPECONVERSIONS_H
11
12#include <optional>
13
14namespace mlir {
15class TypeConverter;
16class Type;
17void populateEmitCSizeTTypeConversions(TypeConverter &converter);
18
19namespace emitc {
20std::optional<Type> getUnsignedTypeFor(Type ty);
21std::optional<Type> getSignedTypeFor(Type ty);
22} // namespace emitc
23
24} // namespace mlir
25
26#endif // MLIR_DIALECT_EMITC_TRANSFORMS_TYPECONVERSIONS_H
Instances of the Type class are uniqued, have an immutable identifier and an optional mutable compone...
Definition Types.h:74
std::optional< Type > getSignedTypeFor(Type ty)
Get a signed integer or size data type corresponding to ty that supports arithmetic on negative value...
std::optional< Type > getUnsignedTypeFor(Type ty)
Get an unsigned integer or size data type corresponding to ty.
Include the generated interface declarations.
void populateEmitCSizeTTypeConversions(TypeConverter &converter)