sun::codegen::variables

sun::codegen::variables

namespace · Source (opens in a new tab)

Generates storage and access operations for Sun variables.

Classes

Functions

constructorArgsForGlobal

public · function · static · Source (opens in a new tab)

static const std::vector< std::unique_ptr< ExprAST > > * sun::codegen::variables::constructorArgsForGlobal(const ExprAST &initExpr)

The initializer of a global class variable constructs it in place when it names the class: Class(args) is a call whose callee resolves to the class, and Class<T>(args) a generic call that resolves to it.

Intrinsics and generic functions merely return a class, so they are not constructions. Returns the constructor arguments, or null when the initializer is anything else.

Related: ExprAST

isDirectAlias

public · function · static · Source (opens in a new tab)

static bool sun::codegen::variables::isDirectAlias(AllocaInst *alloca, llvm::Type *referencedType)

Check if a reference is a direct alias (same alloca as target) or indirect (holds a pointer to a global).

Returns true if direct alias.

Type Aliases