clang 24.0.0git
clang::CIRGen::CIRGenFunction::CapturedCleanups Class Reference

Captures cleanups for variables whose lifetime ends in a region owned by an enclosing op rather than at the end of a cir.cleanup.scope, so that they can be emitted into that region later. More...

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

Classes

class  CaptureScope
 An RAII class that suppresses cir.cleanup.scope creation for cleanups pushed onto the EH stack while such a variable is being emitted and instead captures these cleanups so that they can be emitted into the owning op's cleanup region later. More...

Public Member Functions

 CapturedCleanups (CIRGenFunction &cgf, bool active)
void emitIntoCleanupRegion (mlir::Location loc)
 Emit the captured cleanups into the current insertion point, which must be inside the owning op's cleanup region.

Detailed Description

Captures cleanups for variables whose lifetime ends in a region owned by an enclosing op rather than at the end of a cir.cleanup.scope, so that they can be emitted into that region later.

Examples for uses are:

  • A loop condition variable's cleanups in the loop op's per-iteration cleanup region.
  • Coroutine parameters and promises, which are cleaned up in a separate destroy region

Definition at line 1504 of file CIRGenFunction.h.

Constructor & Destructor Documentation

◆ CapturedCleanups()

clang::CIRGen::CIRGenFunction::CapturedCleanups::CapturedCleanups ( CIRGenFunction & cgf,
bool active )
inline

Member Function Documentation

◆ emitIntoCleanupRegion()

void clang::CIRGen::CIRGenFunction::CapturedCleanups::emitIntoCleanupRegion ( mlir::Location loc)
inline

Emit the captured cleanups into the current insertion point, which must be inside the owning op's cleanup region.

Definition at line 1538 of file CIRGenFunction.h.


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