FLANG

Public Types | Public Member Functions | Public Attributes | List of all members
Fortran::lower::SymbolBox Struct Reference

`#include <Lower/SymbolMap.h>`

## Public Types
using | None = std::monostate
using | Intrinsic = fir::AbstractBox
using | FullDim = fir::ArrayBoxValue
using | Char = fir::CharBoxValue
using | CharFullDim = fir::CharArrayBoxValue
using | Derived = fir::BoxValue

## Public Member Functions
template<typename A >
| SymbolBox (const A &x)
| operator bool () const
| operator mlir::Value () const
mlir::Value | getAddr () const
llvm::Optional< mlir::Value > | getCharLen () const
| Get the LEN type parameter of a CHARACTER boxed value.
bool | isIntrinsic () const
| Does the boxed value have an intrinsic type?
bool | hasRank () const
| Does the boxed value have a rank greater than zero?
bool | hasSimpleLBounds () const
| Does the boxed value have trivial lower bounds (== 1)?
bool | hasConstantShape () const
| Does the boxed value have a constant shape?
mlir::Value | getLBound (unsigned dim) const
| Get the lbound if the box explicitly contains it.
template<typename ON , typename RT >
constexpr RT | apply (RT(&&func)(const ON &)) const
| Apply the lambda `func` to this box value.

## Public Attributes
std::variant< Intrinsic, FullDim, Char, CharFullDim, Derived, None > | box

## Detailed Description

A dictionary entry of ssa-values that together compose a variable referenced by a Symbol. For example, the declaration

CHARACTER(LEN=i) :: c(j1,j2)

is a single variable `c`. This variable is a two-dimensional array of CHARACTER. It has a starting address and three dynamic properties: the LEN parameter `i` a runtime value describing the length of the CHARACTER, and the `j1` and `j2` runtime values, which describe the shape of the array.

The lowering bridge needs to be able to record all four of these ssa-values in the lookup table to be able to correctly lower Fortran to FIR.

## Member Function Documentation

## ◆ getAddr()

mlir::Value Fortran::lower::SymbolBox::getAddr | ( |  | ) | const
| inline

Get address of the boxed value. For a scalar, this is the address of the scalar. For an array, this is the address of the first element in the array, etc.

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

- lib/Lower/SymbolMap.h