21#ifndef FORTRAN_LOWER_CONVERT_TYPE_H
22#define FORTRAN_LOWER_CONVERT_TYPE_H
24#include "flang/Evaluate/type.h"
25#include "flang/Support/Fortran.h"
26#include "mlir/Dialect/Arith/IR/Arith.h"
27#include "mlir/IR/BuiltinTypes.h"
62using SomeExpr = evaluate::Expr<evaluate::SomeType>;
63using SymbolRef = common::Reference<const semantics::Symbol>;
66using LenParameterTy = std::int64_t;
69mlir::Type
getFIRType(mlir::MLIRContext *ctxt, common::TypeCategory tc,
79 const SomeExpr &expr);
83 const SymbolRef symbol);
90mlir::Type
convertReal(mlir::MLIRContext *ctxt,
int KIND);
101FOR_EACH_SPECIFIC_TYPE(
extern template class TypeBuilder, )
106class ComponentReverseIterator {
109 setCurrentType(derived);
115 componentIt = std::find(componentIt, componentItEnd, name);
116 return componentIt != componentItEnd;
129 using name_iterator =
130 std::list<Fortran::parser::CharBlock>::const_reverse_iterator;
131 name_iterator componentIt{};
132 name_iterator componentItEnd{};
135mlir::arith::CmpIPredicate
136translateSignedRelational(Fortran::common::RelationalOperator rop);
137mlir::arith::CmpIPredicate
138translateUnsignedRelational(Fortran::common::RelationalOperator rop);
139mlir::arith::CmpFPredicate
140translateFloatRelational(Fortran::common::RelationalOperator rop);
Definition reference.h:18
Definition AbstractConverter.h:87
const Fortran::semantics::DerivedTypeSpec & advanceToParentType()
Advance iterator to the last components of the current type parent.
Definition ConvertType.cpp:644
const Fortran::semantics::Symbol * getParentComponent() const
Get the parent component symbol for the current type.
Definition ConvertType.cpp:654
Definition ConvertType.h:95
Definition char-block.h:28
Definition bit-population-count.h:20
Definition ParserActions.h:24
mlir::Type translateVariableToFIRType(Fortran::lower::AbstractConverter &, const pft::Variable &variable)
Translate a Fortran::lower::pft::Variable to an mlir::Type.
Definition ConvertType.cpp:617
mlir::Type translateSomeExprToFIRType(Fortran::lower::AbstractConverter &, const SomeExpr &expr)
Translate a SomeExpr to an mlir::Type.
Definition ConvertType.cpp:607
mlir::Type getFIRType(mlir::MLIRContext *ctxt, common::TypeCategory tc, int kind, llvm::ArrayRef< LenParameterTy >)
Get a FIR type based on a category and kind.
mlir::Type convertReal(mlir::MLIRContext *ctxt, int KIND)
Translate a REAL of KIND to the mlir::Type.
Definition ConvertType.cpp:623
mlir::Type translateSymbolToFIRType(Fortran::lower::AbstractConverter &, const SymbolRef symbol)
Translate a Fortran::semantics::Symbol to an mlir::Type.
Definition ConvertType.cpp:612
mlir::Type translateDerivedTypeToFIRType(Fortran::lower::AbstractConverter &, const Fortran::semantics::DerivedTypeSpec &)
Get a FIR type for a derived type.
Definition ConvertType.cpp:601
Definition bit-population-count.h:20
Definition AbstractConverter.h:32
Definition PFTBuilder.h:410