clang API Documentation
Enters a new scope for capturing cleanups, all of which will be executed once the scope is exited. More...
#include <CodeGenFunction.h>
Public Member Functions | |
RunCleanupsScope (CodeGenFunction &CGF) | |
Enter a new cleanup scope. | |
~RunCleanupsScope () | |
Exit this cleanup scope, emitting any accumulated cleanups. | |
bool | requiresCleanups () const |
Determine whether this scope requires any cleanups. | |
void | ForceCleanup () |
Force the emission of cleanups now, instead of waiting until this object is destroyed. | |
Protected Attributes | |
bool | PerformCleanup |
CodeGenFunction & | CGF |
Enters a new scope for capturing cleanups, all of which will be executed once the scope is exited.
Definition at line 494 of file CodeGenFunction.h.
clang::CodeGen::CodeGenFunction::RunCleanupsScope::RunCleanupsScope | ( | CodeGenFunction & | CGF | ) | [inline, explicit] |
Enter a new cleanup scope.
Definition at line 510 of file CodeGenFunction.h.
Exit this cleanup scope, emitting any accumulated cleanups.
Definition at line 522 of file CodeGenFunction.h.
References CGF, PerformCleanup, and clang::CodeGen::CodeGenFunction::PopCleanupBlocks().
void clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup | ( | ) | [inline] |
Force the emission of cleanups now, instead of waiting until this object is destroyed.
Reimplemented in clang::CodeGen::CodeGenFunction::OMPPrivateScope, and clang::CodeGen::CodeGenFunction::LexicalScope.
Definition at line 537 of file CodeGenFunction.h.
References CGF, PerformCleanup, and clang::CodeGen::CodeGenFunction::PopCleanupBlocks().
Referenced by clang::CodeGen::CodeGenFunction::EmitConstructorBody(), clang::CodeGen::CodeGenFunction::EmitDestructorBody(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), clang::CodeGen::CodeGenFunction::EmitReturnStmt(), clang::CodeGen::CodeGenFunction::EmitSwitchStmt(), clang::CodeGen::CodeGenFunction::EmitWhileStmt(), clang::CodeGen::CodeGenFunction::ExitCXXTryStmt(), clang::CodeGen::CodeGenFunction::GenerateCXXGlobalInitFunc(), and clang::CodeGen::CodeGenFunction::GenerateDestroyHelperFunction().
bool clang::CodeGen::CodeGenFunction::RunCleanupsScope::requiresCleanups | ( | ) | const [inline] |
Determine whether this scope requires any cleanups.
Definition at line 531 of file CodeGenFunction.h.
References CGF, clang::CodeGen::CodeGenFunction::EHStack, and clang::CodeGen::EHScopeStack::stable_begin().
Referenced by emitCXXDestructMethod(), clang::CodeGen::CodeGenFunction::EmitOMPInnerLoop(), clang::CodeGen::CodeGenFunction::EmitSwitchStmt(), and clang::CodeGen::CodeGenFunction::EmitWhileStmt().
Definition at line 506 of file CodeGenFunction.h.
Referenced by clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), ForceCleanup(), clang::CodeGen::CodeGenFunction::LexicalScope::ForceCleanup(), clang::CodeGen::CodeGenFunction::OMPPrivateScope::ForceCleanup(), clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize(), requiresCleanups(), clang::CodeGen::CodeGenFunction::LexicalScope::rescopeLabels(), clang::CodeGen::CodeGenFunction::LexicalScope::~LexicalScope(), and ~RunCleanupsScope().