clang 23.0.0git
clang::CIRGen::CIRGenFunction::RunCleanupsScope Class Reference

Enters a new scope for capturing cleanups, all of which will be executed once the scope is exited. More...

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

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

Public Member Functions

 RunCleanupsScope (CIRGenFunction &cgf)
 Enter a new cleanup scope.
 ~RunCleanupsScope ()
 Exit this cleanup scope, emitting any accumulated cleanups.
void forceCleanup (ArrayRef< mlir::Value * > valuesToReload={})
 Force the emission of cleanups now, instead of waiting until this object is destroyed.
void forceCleanupExceptLifetimeExtended ()
 Force the emission of EH cleanups now, but defer promoting any lifetime-extended cleanup entries onto the EH scope stack.
void forceLifetimeExtendedCleanups ()
 Promote any pending lifetime-extended cleanup entries onto the EH scope stack at the current insertion point and finalize this scope.
bool hasPendingCleanups () const
 Whether there are any pending cleanups that have been pushed since this scope was entered.

Protected Attributes

bool performCleanup
bool oldDidCallStackSave
CIRGenFunctioncgf

Detailed Description

Enters a new scope for capturing cleanups, all of which will be executed once the scope is exited.

Definition at line 1161 of file CIRGenFunction.h.

Constructor & Destructor Documentation

◆ RunCleanupsScope()

clang::CIRGen::CIRGenFunction::RunCleanupsScope::RunCleanupsScope ( CIRGenFunction & cgf)
inlineexplicit

Enter a new cleanup scope.

Definition at line 1179 of file CIRGenFunction.h.

References cgf, clang::CIRGen::CIRGenFunction::CIRGenFunction(), oldDidCallStackSave, performCleanup, and true.

◆ ~RunCleanupsScope()

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

Exit this cleanup scope, emitting any accumulated cleanups.

Definition at line 1191 of file CIRGenFunction.h.

References forceCleanup(), and performCleanup.

Member Function Documentation

◆ forceCleanup()

◆ forceCleanupExceptLifetimeExtended()

void clang::CIRGen::CIRGenFunction::RunCleanupsScope::forceCleanupExceptLifetimeExtended ( )
inline

Force the emission of EH cleanups now, but defer promoting any lifetime-extended cleanup entries onto the EH scope stack.

The caller must subsequently call forceLifetimeExtendedCleanups() to finalize the scope.

Definition at line 1269 of file CIRGenFunction.h.

References cgf, oldDidCallStackSave, and performCleanup.

◆ forceLifetimeExtendedCleanups()

void clang::CIRGen::CIRGenFunction::RunCleanupsScope::forceLifetimeExtendedCleanups ( )
inline

Promote any pending lifetime-extended cleanup entries onto the EH scope stack at the current insertion point and finalize this scope.

This must be paired with a prior call to forceCleanupExceptLifetimeExtended().

Definition at line 1279 of file CIRGenFunction.h.

References cgf, and performCleanup.

◆ hasPendingCleanups()

bool clang::CIRGen::CIRGenFunction::RunCleanupsScope::hasPendingCleanups ( ) const
inline

Whether there are any pending cleanups that have been pushed since this scope was entered.

Definition at line 1290 of file CIRGenFunction.h.

References cgf.

Member Data Documentation

◆ cgf

◆ oldDidCallStackSave

bool clang::CIRGen::CIRGenFunction::RunCleanupsScope::oldDidCallStackSave
protected

Definition at line 1168 of file CIRGenFunction.h.

Referenced by forceCleanupExceptLifetimeExtended(), and RunCleanupsScope().

◆ performCleanup

bool clang::CIRGen::CIRGenFunction::RunCleanupsScope::performCleanup
protected

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