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

Represents a scope, including function bodies, compound statements, and the substatements of if/while/do/for/switch/try statements. More...

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

Inheritance diagram for clang::CIRGen::CIRGenFunction::LexicalScope:
[legend]

Public Member Functions

 LexicalScope (CIRGenFunction &cgf, mlir::Location loc, mlir::Block *eb)
 
void setRetVal (mlir::Value v)
 
void cleanup ()
 
void restore ()
 
 ~LexicalScope ()
 
bool isGlobalInit ()
 
bool isRegular ()
 
bool isSwitch ()
 
bool isTernary ()
 
bool isTry ()
 
void setAsGlobalInit ()
 
void setAsSwitch ()
 
void setAsTernary ()
 
mlir::Block * getOrCreateCleanupBlock (mlir::OpBuilder &builder)
 
mlir::Block * getCleanupBlock (mlir::OpBuilder &builder)
 
mlir::Block * createCleanupBlock (mlir::OpBuilder &builder)
 
mlir::Block * getRetBlock ()
 
mlir::Location getRetLoc (mlir::Block *b)
 
void updateRetLoc (mlir::Block *b, mlir::Location loc)
 
mlir::Block * getOrCreateRetBlock (CIRGenFunction &cgf, mlir::Location loc)
 
mlir::Block * getEntryBlock ()
 
- Public Member Functions inherited from clang::CIRGen::CIRGenFunction::RunCleanupsScope
 RunCleanupsScope (CIRGenFunction &cgf)
 Enter a new cleanup scope.
 
 ~RunCleanupsScope ()
 Exit this cleanup scope, emitting any accumulated cleanups.
 
void forceCleanup ()
 Force the emission of cleanups now, instead of waiting until this object is destroyed.
 

Public Attributes

unsigned depth = 0
 

Additional Inherited Members

- Protected Attributes inherited from clang::CIRGen::CIRGenFunction::RunCleanupsScope
bool performCleanup
 
CIRGenFunctioncgf
 

Detailed Description

Represents a scope, including function bodies, compound statements, and the substatements of if/while/do/for/switch/try statements.

This class handles any automatic cleanup, along with the return value.

Definition at line 774 of file CIRGenFunction.h.

Constructor & Destructor Documentation

◆ LexicalScope()

clang::CIRGen::CIRGenFunction::LexicalScope::LexicalScope ( CIRGenFunction cgf,
mlir::Location  loc,
mlir::Block *  eb 
)
inline

◆ ~LexicalScope()

clang::CIRGen::CIRGenFunction::LexicalScope::~LexicalScope ( )
inline

Definition at line 828 of file CIRGenFunction.h.

References cleanup(), cir::MissingFeatures::generateDebugInfo(), and restore().

Member Function Documentation

◆ cleanup()

void clang::CIRGen::CIRGenFunction::LexicalScope::cleanup ( )

◆ createCleanupBlock()

mlir::Block * clang::CIRGen::CIRGenFunction::LexicalScope::createCleanupBlock ( mlir::OpBuilder &  builder)
inline

◆ getCleanupBlock()

mlir::Block * clang::CIRGen::CIRGenFunction::LexicalScope::getCleanupBlock ( mlir::OpBuilder &  builder)
inline

Definition at line 855 of file CIRGenFunction.h.

Referenced by cleanup().

◆ getEntryBlock()

mlir::Block * clang::CIRGen::CIRGenFunction::LexicalScope::getEntryBlock ( )
inline

Definition at line 913 of file CIRGenFunction.h.

◆ getOrCreateCleanupBlock()

mlir::Block * clang::CIRGen::CIRGenFunction::LexicalScope::getOrCreateCleanupBlock ( mlir::OpBuilder &  builder)
inline

Definition at line 848 of file CIRGenFunction.h.

References createCleanupBlock().

◆ getOrCreateRetBlock()

mlir::Block * clang::CIRGen::CIRGenFunction::LexicalScope::getOrCreateRetBlock ( CIRGenFunction cgf,
mlir::Location  loc 
)
inline

◆ getRetBlock()

mlir::Block * clang::CIRGen::CIRGenFunction::LexicalScope::getRetBlock ( )
inline

Definition at line 896 of file CIRGenFunction.h.

◆ getRetLoc()

mlir::Location clang::CIRGen::CIRGenFunction::LexicalScope::getRetLoc ( mlir::Block *  b)
inline

Definition at line 897 of file CIRGenFunction.h.

◆ isGlobalInit()

bool clang::CIRGen::CIRGenFunction::LexicalScope::isGlobalInit ( )
inline

Definition at line 837 of file CIRGenFunction.h.

Referenced by cleanup().

◆ isRegular()

bool clang::CIRGen::CIRGenFunction::LexicalScope::isRegular ( )
inline

Definition at line 838 of file CIRGenFunction.h.

◆ isSwitch()

bool clang::CIRGen::CIRGenFunction::LexicalScope::isSwitch ( )
inline

Definition at line 839 of file CIRGenFunction.h.

◆ isTernary()

bool clang::CIRGen::CIRGenFunction::LexicalScope::isTernary ( )
inline

Definition at line 840 of file CIRGenFunction.h.

Referenced by cleanup().

◆ isTry()

bool clang::CIRGen::CIRGenFunction::LexicalScope::isTry ( )
inline

Definition at line 841 of file CIRGenFunction.h.

◆ restore()

void clang::CIRGen::CIRGenFunction::LexicalScope::restore ( )
inline

◆ setAsGlobalInit()

void clang::CIRGen::CIRGenFunction::LexicalScope::setAsGlobalInit ( )
inline

Definition at line 843 of file CIRGenFunction.h.

◆ setAsSwitch()

void clang::CIRGen::CIRGenFunction::LexicalScope::setAsSwitch ( )
inline

Definition at line 844 of file CIRGenFunction.h.

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

◆ setAsTernary()

void clang::CIRGen::CIRGenFunction::LexicalScope::setAsTernary ( )
inline

Definition at line 845 of file CIRGenFunction.h.

◆ setRetVal()

void clang::CIRGen::CIRGenFunction::LexicalScope::setRetVal ( mlir::Value  v)
inline

Definition at line 823 of file CIRGenFunction.h.

◆ updateRetLoc()

void clang::CIRGen::CIRGenFunction::LexicalScope::updateRetLoc ( mlir::Block *  b,
mlir::Location  loc 
)
inline

Definition at line 898 of file CIRGenFunction.h.

Referenced by getOrCreateRetBlock().

Member Data Documentation

◆ depth

unsigned clang::CIRGen::CIRGenFunction::LexicalScope::depth = 0

Definition at line 805 of file CIRGenFunction.h.

Referenced by cleanup(), and LexicalScope().


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