clang 24.0.0git
clang::CIRGen::CIRGenFunction::PendingCleanupEntry Struct Reference

A cleanup whose destructor call is not emitted where the cleanup is registered. More...

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

Public Attributes

CleanupKind kind
Address addr
QualType type
Destroyer * destroyer
Address activeFlag = Address::invalid()
CapturedCleanups * capturedBy = nullptr
 If set, the cleanup is captured by this owner instead of opening a cir.cleanup.scope when it is pushed onto the EH stack.

Detailed Description

A cleanup whose destructor call is not emitted where the cleanup is registered.

Used by the lifetime-extended cleanup stack, whose entries are later promoted onto the EH scope stack, and by the deferred conditional cleanup stack, whose entries are emitted directly into a conditional scope's cleanup region.

A valid activeFlag means the cleanup is conditional. The flag tracks at run time whether the object has been constructed, and guards the destructor call.

Currently only DestroyObject cleanups use this. When other cleanup types are needed (e.g., CallLifetimeEnd), this struct can be extended with a std::variant of cleanup data types.

Definition at line 147 of file CIRGenFunction.h.

Member Data Documentation

◆ activeFlag

Address clang::CIRGen::CIRGenFunction::PendingCleanupEntry::activeFlag = Address::invalid()

◆ addr

Address clang::CIRGen::CIRGenFunction::PendingCleanupEntry::addr

◆ capturedBy

CapturedCleanups* clang::CIRGen::CIRGenFunction::PendingCleanupEntry::capturedBy = nullptr

If set, the cleanup is captured by this owner instead of opening a cir.cleanup.scope when it is pushed onto the EH stack.

Definition at line 155 of file CIRGenFunction.h.

Referenced by clang::CIRGen::CIRGenFunction::pushLifetimeExtendedDestroy(), and clang::CIRGen::CIRGenFunction::pushPendingCleanupToEHStack().

◆ destroyer

Destroyer* clang::CIRGen::CIRGenFunction::PendingCleanupEntry::destroyer

◆ kind

CleanupKind clang::CIRGen::CIRGenFunction::PendingCleanupEntry::kind

◆ type

QualType clang::CIRGen::CIRGenFunction::PendingCleanupEntry::type

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