clang 22.0.0git
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
clang::CIRGen::CIRGenFunction::AutoVarEmission Struct Reference

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CIR/CodeGen/CIRGenFunction.h"

Classes

struct  Invalid
 

Public Member Functions

 AutoVarEmission (Invalid)
 
 AutoVarEmission (const clang::VarDecl &variable)
 
bool wasEmittedAsGlobal () const
 
bool wasEmittedAsOffloadClause () const
 
Address getAllocatedAddress () const
 Returns the raw, allocated address, which is not necessarily the address of the object itself.
 
void setAllocatedAddress (Address A)
 
Address getObjectAddress (CIRGenFunction &cgf) const
 Returns the address of the object within this declaration.
 

Static Public Member Functions

static AutoVarEmission invalid ()
 

Public Attributes

const clang::VarDeclVariable
 
Address Addr
 The address of the alloca for languages with explicit address space (e.g.
 
bool IsConstantAggregate = false
 True if the variable is of aggregate type and has a constant initializer.
 
bool IsEscapingByRef = false
 True if the variable is a __block variable that is captured by an escaping block.
 
bool EmittedAsOffload = false
 True if the variable was emitted as an offload recipe, and thus doesn't have the same sort of alloca initialization.
 
mlir::Value NRVOFlag {}
 

Detailed Description

Definition at line 458 of file CIRGenFunction.h.

Constructor & Destructor Documentation

◆ AutoVarEmission() [1/2]

clang::CIRGen::CIRGenFunction::AutoVarEmission::AutoVarEmission ( Invalid  )
inline

Definition at line 481 of file CIRGenFunction.h.

◆ AutoVarEmission() [2/2]

clang::CIRGen::CIRGenFunction::AutoVarEmission::AutoVarEmission ( const clang::VarDecl variable)
inline

Definition at line 483 of file CIRGenFunction.h.

Member Function Documentation

◆ getAllocatedAddress()

Address clang::CIRGen::CIRGenFunction::AutoVarEmission::getAllocatedAddress ( ) const
inline

Returns the raw, allocated address, which is not necessarily the address of the object itself.

It is casted to default address space for address space agnostic languages.

Definition at line 495 of file CIRGenFunction.h.

References Addr.

◆ getObjectAddress()

Address clang::CIRGen::CIRGenFunction::AutoVarEmission::getObjectAddress ( CIRGenFunction cgf) const
inline

Returns the address of the object within this declaration.

Note that this does not chase the forwarding pointer for __block decls.

Definition at line 505 of file CIRGenFunction.h.

References Addr, clang::CIRGen::Address::invalid(), IsEscapingByRef, and cir::MissingFeatures::opAllocaEscapeByReference().

Referenced by clang::CIRGen::CIRGenFunction::emitAutoVarTypeCleanup().

◆ invalid()

static AutoVarEmission clang::CIRGen::CIRGenFunction::AutoVarEmission::invalid ( )
inlinestatic

Definition at line 486 of file CIRGenFunction.h.

◆ setAllocatedAddress()

void clang::CIRGen::CIRGenFunction::AutoVarEmission::setAllocatedAddress ( Address  A)
inline

Definition at line 500 of file CIRGenFunction.h.

References Addr.

◆ wasEmittedAsGlobal()

bool clang::CIRGen::CIRGenFunction::AutoVarEmission::wasEmittedAsGlobal ( ) const
inline

◆ wasEmittedAsOffloadClause()

bool clang::CIRGen::CIRGenFunction::AutoVarEmission::wasEmittedAsOffloadClause ( ) const
inline

Definition at line 490 of file CIRGenFunction.h.

References EmittedAsOffload.

Referenced by clang::CIRGen::CIRGenFunction::emitAutoVarInit().

Member Data Documentation

◆ Addr

Address clang::CIRGen::CIRGenFunction::AutoVarEmission::Addr

The address of the alloca for languages with explicit address space (e.g.

OpenCL) or alloca casted to generic pointer for address space agnostic languages (e.g. C++). Invalid if the variable was emitted as a global constant.

Definition at line 464 of file CIRGenFunction.h.

Referenced by clang::CIRGen::CIRGenFunction::emitAutoVarAlloca(), clang::CIRGen::CIRGenFunction::emitAutoVarInit(), getAllocatedAddress(), getObjectAddress(), setAllocatedAddress(), and wasEmittedAsGlobal().

◆ EmittedAsOffload

bool clang::CIRGen::CIRGenFunction::AutoVarEmission::EmittedAsOffload = false

True if the variable was emitted as an offload recipe, and thus doesn't have the same sort of alloca initialization.

Definition at line 476 of file CIRGenFunction.h.

Referenced by wasEmittedAsOffloadClause().

◆ IsConstantAggregate

bool clang::CIRGen::CIRGenFunction::AutoVarEmission::IsConstantAggregate = false

True if the variable is of aggregate type and has a constant initializer.

Definition at line 468 of file CIRGenFunction.h.

Referenced by clang::CIRGen::CIRGenFunction::emitAutoVarInit().

◆ IsEscapingByRef

bool clang::CIRGen::CIRGenFunction::AutoVarEmission::IsEscapingByRef = false

True if the variable is a __block variable that is captured by an escaping block.

Definition at line 472 of file CIRGenFunction.h.

Referenced by clang::CIRGen::CIRGenFunction::emitAutoVarAlloca(), and getObjectAddress().

◆ NRVOFlag

mlir::Value clang::CIRGen::CIRGenFunction::AutoVarEmission::NRVOFlag {}

◆ Variable

const clang::VarDecl* clang::CIRGen::CIRGenFunction::AutoVarEmission::Variable

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