FLANG
Fortran::lower::BoxAnalyzer Class Reference

#include <flang/Lower/BoxAnalyzer.h>

Inheritance diagram for Fortran::lower::BoxAnalyzer:
fir::details::matcher< BoxAnalyzer >

Public Types

using None = std::monostate
using ScalarSym = details::ScalarSym
using ScalarStaticChar = details::ScalarStaticChar
using ScalarDynamicChar = details::ScalarDynamicChar
using StaticArray = details::StaticArray
using DynamicArray = details::DynamicArray
using StaticArrayStaticChar = details::StaticArrayStaticChar
using StaticArrayDynamicChar = details::StaticArrayDynamicChar
using DynamicArrayStaticChar = details::DynamicArrayStaticChar
using DynamicArrayDynamicChar = details::DynamicArrayDynamicChar
using VT

Public Member Functions

 operator bool () const
bool isTrivial () const
bool isChar () const
 Returns true for any sort of CHARACTER.
bool isArray () const
 Returns true for any sort of array.
bool isStaticArray () const
bool isConstant () const
std::optional< int64_t > getCharLenConst () const
std::optional< Fortran::lower::SomeExprgetCharLenExpr () const
bool lboundIsAllOnes () const
 Is the origin of this array the default of vector of 1?
llvm::ArrayRef< int64_t > staticLBound () const
 Get the static lbound values (the origin of the array).
llvm::ArrayRef< int64_t > staticShape () const
 Get the static extents of the array.
llvm::ArrayRef< const Fortran::semantics::ShapeSpec * > dynamicBound () const
 Get the dynamic bounds information of the array (both origin, shape).
void analyze (const Fortran::semantics::Symbol &sym)
 Run the analysis on sym.
const VT & matchee () const
Public Member Functions inherited from fir::details::matcher< BoxAnalyzer >
auto match (Ts... ts)

Detailed Description

Analyze a symbol, classify it as to whether it just a scalar, a CHARACTER scalar, an array entity, a combination thereof, and whether the LEN, shape, and lbounds are constant or not.

Member Typedef Documentation

◆ VT

using Fortran::lower::BoxAnalyzer::VT
Initial value:
std::variant<None, ScalarSym, ScalarStaticChar, ScalarDynamicChar,
StaticArray, DynamicArray, StaticArrayStaticChar,
StaticArrayDynamicChar, DynamicArrayStaticChar,
DynamicArrayDynamicChar>

Member Function Documentation

◆ isStaticArray()

bool Fortran::lower::BoxAnalyzer::isStaticArray ( ) const
inline

Returns true iff this is an array with constant extents and lbounds. This returns true for arrays of CHARACTER, even if the LEN is not a constant.


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