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/IR/BuiltinTypes.h"
61using SomeExpr = evaluate::Expr<evaluate::SomeType>;
62using SymbolRef = common::Reference<const semantics::Symbol>;
65using LenParameterTy = std::int64_t;
68mlir::Type
getFIRType(mlir::MLIRContext *ctxt, common::TypeCategory tc,
78 const SomeExpr &expr);
82 const SymbolRef symbol);
89mlir::Type
convertReal(mlir::MLIRContext *ctxt,
int KIND);
100FOR_EACH_SPECIFIC_TYPE(
extern template class TypeBuilder, )
105class ComponentReverseIterator {
108 setCurrentType(derived);
114 componentIt = std::find(componentIt, componentItEnd, name);
115 return componentIt != componentItEnd;
128 using name_iterator =
129 std::list<Fortran::parser::CharBlock>::const_reverse_iterator;
130 name_iterator componentIt{};
131 name_iterator componentItEnd{};
Definition reference.h:18
Definition AbstractConverter.h:85
const Fortran::semantics::DerivedTypeSpec & advanceToParentType()
Advance iterator to the last components of the current type parent.
Definition ConvertType.cpp:663
const Fortran::semantics::Symbol * getParentComponent() const
Get the parent component symbol for the current type.
Definition ConvertType.cpp:673
Definition ConvertType.h:94
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:636
mlir::Type translateSomeExprToFIRType(Fortran::lower::AbstractConverter &, const SomeExpr &expr)
Translate a SomeExpr to an mlir::Type.
Definition ConvertType.cpp:626
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:642
mlir::Type translateSymbolToFIRType(Fortran::lower::AbstractConverter &, const SymbolRef symbol)
Translate a Fortran::semantics::Symbol to an mlir::Type.
Definition ConvertType.cpp:631
mlir::Type translateDerivedTypeToFIRType(Fortran::lower::AbstractConverter &, const Fortran::semantics::DerivedTypeSpec &)
Get a FIR type for a derived type.
Definition ConvertType.cpp:620
Definition bit-population-count.h:20
Definition AbstractConverter.h:29
Definition PFTBuilder.h:410