MLIR  20.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 
14 namespace mlir {
15 class TypeConverter;
16 class Type;
17 void populateEmitCSizeTTypeConversions(TypeConverter &converter);
18 
19 namespace emitc {
20 std::optional<Type> getUnsignedTypeFor(Type ty);
21 std::optional<Type> getSignedTypeFor(Type ty);
22 } // namespace emitc
23 
24 } // namespace mlir
25 
26 #endif // MLIR_DIALECT_EMITC_TRANSFORMS_TYPECONVERSIONS_H
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.
@ Type
An inlay hint that for a type annotation.
Include the generated interface declarations.
void populateEmitCSizeTTypeConversions(TypeConverter &converter)