FLANG
Static Public Member Functions | List of all members
Fortran::lower::ConstantBuilder< T > Class Template Reference

Class to lower evaluate::Constant to fir::ExtendedValue. More...

#include <flang/Lower/ConvertConstant.h>

Static Public Member Functions

static fir::ExtendedValue gen (Fortran::lower::AbstractConverter &converter, mlir::Location loc, const evaluate::Constant< T > &constant, bool outlineBigConstantsInReadOnlyMemory)
 

Detailed Description

template<typename T>
class Fortran::lower::ConstantBuilder< T >

Class to lower evaluate::Constant to fir::ExtendedValue.

Member Function Documentation

◆ gen()

template<typename T >
fir::ExtendedValue Fortran::lower::ConstantBuilder< T >::gen ( Fortran::lower::AbstractConverter converter,
mlir::Location  loc,
const evaluate::Constant< T > &  constant,
bool  outlineBigConstantsInReadOnlyMemory 
)
static

Lower constant into a fir::ExtendedValue. If outlineBigConstantsInReadOnlyMemory is set, character, derived type, and array constants will be lowered into read only memory fir.global, and the resulting fir::ExtendedValue will contain the address of the fir.global. This option should not be set if the constant is being lowered while the builder is already in a fir.global body because fir.global initialization body cannot contain code manipulating memory (e.g. fir.load/fir.store...).


The documentation for this class was generated from the following files: