clang 19.0.0git
Classes | Public Member Functions | Protected Member Functions | List of all members
clang::CodeGen::EHScopeStack::Cleanup Class Referenceabstract

Information for lazily generating a cleanup. More...

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

Inheritance diagram for clang::CodeGen::EHScopeStack::Cleanup:
Inheritance graph
[legend]

Classes

class  Flags
 Generation flags. More...
 

Public Member Functions

 Cleanup (const Cleanup &)=default
 
 Cleanup (Cleanup &&)
 
Cleanupoperator= (const Cleanup &)=delete
 
Cleanupoperator= (Cleanup &&)=delete
 
 Cleanup ()=default
 
virtual bool isRedundantBeforeReturn ()
 
virtual void Emit (CodeGenFunction &CGF, Flags flags)=0
 Emit the cleanup.
 

Protected Member Functions

 ~Cleanup ()=default
 

Detailed Description

Information for lazily generating a cleanup.

Subclasses must be POD-like: cleanups will not be destructed, and they will be allocated on the cleanup stack and freely copied and moved around.

Cleanup implementations should generally be declared in an anonymous namespace.

Definition at line 141 of file EHScopeStack.h.

Constructor & Destructor Documentation

◆ ~Cleanup()

clang::CodeGen::EHScopeStack::Cleanup::~Cleanup ( )
protecteddefault

◆ Cleanup() [1/3]

clang::CodeGen::EHScopeStack::Cleanup::Cleanup ( const Cleanup )
default

◆ Cleanup() [2/3]

clang::CodeGen::EHScopeStack::Cleanup::Cleanup ( Cleanup &&  )
inline

Definition at line 150 of file EHScopeStack.h.

◆ Cleanup() [3/3]

clang::CodeGen::EHScopeStack::Cleanup::Cleanup ( )
default

Member Function Documentation

◆ Emit()

virtual void clang::CodeGen::EHScopeStack::Cleanup::Emit ( CodeGenFunction CGF,
Flags  flags 
)
pure virtual

Emit the cleanup.

For normal cleanups, this is run in the same EH context as when the cleanup was pushed, i.e. the immediately-enclosing context of the cleanup scope. For EH cleanups, this is run in a terminate context.

Implemented in clang::CodeGen::CatchRetScope, clang::CodeGen::CodeGenFunction::CallLifetimeEnd, and clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::OMPAllocateCleanupTy.

Referenced by EmitCleanup().

◆ isRedundantBeforeReturn()

virtual bool clang::CodeGen::EHScopeStack::Cleanup::isRedundantBeforeReturn ( )
inlinevirtual

Definition at line 159 of file EHScopeStack.h.

◆ operator=() [1/2]

Cleanup & clang::CodeGen::EHScopeStack::Cleanup::operator= ( Cleanup &&  )
delete

◆ operator=() [2/2]

Cleanup & clang::CodeGen::EHScopeStack::Cleanup::operator= ( const Cleanup )
delete

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