clang 20.0.0git
|
A stack of scopes which respond to exceptions, including cleanups and catch blocks. More...
#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CodeGen/EHScopeStack.h"
Classes | |
class | Cleanup |
Information for lazily generating a cleanup. More... | |
class | ConditionalCleanup |
ConditionalCleanup stores the saved form of its parameters, then restores them and performs the cleanup. More... | |
class | iterator |
A non-stable pointer into the scope stack. More... | |
class | stable_iterator |
A saved depth on the scope stack. More... | |
Public Types | |
enum | { ScopeStackAlignment = 8 } |
Public Member Functions | |
EHScopeStack () | |
~EHScopeStack () | |
EHScopeStack (const EHScopeStack &)=delete | |
EHScopeStack & | operator= (const EHScopeStack &)=delete |
template<class T , class... As> | |
void | pushCleanup (CleanupKind Kind, As... A) |
Push a lazily-created cleanup on the stack. | |
template<class T , class... As> | |
void | pushCleanupTuple (CleanupKind Kind, std::tuple< As... > A) |
Push a lazily-created cleanup on the stack. Tuple version. | |
template<class T , class... As> | |
T * | pushCleanupWithExtra (CleanupKind Kind, size_t N, As... A) |
Push a cleanup with non-constant storage requirements on the stack. | |
void | pushCopyOfCleanup (CleanupKind Kind, const void *Cleanup, size_t Size) |
void | setCGF (CodeGenFunction *inCGF) |
void | popCleanup () |
Pops a cleanup scope off the stack. This is private to CGCleanup.cpp. | |
class EHCatchScope * | pushCatch (unsigned NumHandlers) |
Push a set of catch handlers on the stack. | |
void | popCatch () |
Pops a catch scope off the stack. This is private to CGException.cpp. | |
class EHFilterScope * | pushFilter (unsigned NumFilters) |
Push an exceptions filter on the stack. | |
void | popFilter () |
Pops an exceptions filter off the stack. | |
void | pushTerminate () |
Push a terminate handler on the stack. | |
void | popTerminate () |
Pops a terminate handler off the stack. | |
bool | containsOnlyLifetimeMarkers (stable_iterator Old) const |
bool | empty () const |
Determines whether the exception-scopes stack is empty. | |
bool | requiresLandingPad () const |
bool | hasNormalCleanups () const |
Determines whether there are any normal cleanups on the stack. | |
stable_iterator | getInnermostNormalCleanup () const |
Returns the innermost normal cleanup on the stack, or stable_end() if there are no normal cleanups. | |
stable_iterator | getInnermostActiveNormalCleanup () const |
stable_iterator | getInnermostEHScope () const |
iterator | begin () const |
Returns an iterator pointing to the innermost EH scope. | |
iterator | end () const |
Returns an iterator pointing to the outermost EH scope. | |
stable_iterator | stable_begin () const |
Create a stable reference to the top of the EH stack. | |
stable_iterator | stabilize (iterator it) const |
Translates an iterator into a stable_iterator. | |
iterator | find (stable_iterator save) const |
Turn a stable reference to a scope depth into a unstable pointer to the EH stack. | |
BranchFixup & | addBranchFixup () |
Add a branch fixup to the current cleanup scope. | |
unsigned | getNumBranchFixups () const |
BranchFixup & | getBranchFixup (unsigned I) |
void | popNullFixups () |
Pops lazily-removed fixups from the end of the list. | |
void | clearFixups () |
Clears the branch-fixups list. | |
Static Public Member Functions | |
static stable_iterator | stable_end () |
Create a stable reference to the bottom of the EH stack. | |
A stack of scopes which respond to exceptions, including cleanups and catch blocks.
Definition at line 94 of file EHScopeStack.h.
anonymous enum |
Enumerator | |
---|---|
ScopeStackAlignment |
Definition at line 97 of file EHScopeStack.h.
|
inline |
Definition at line 275 of file EHScopeStack.h.
|
inline |
Definition at line 279 of file EHScopeStack.h.
|
delete |
|
inline |
Add a branch fixup to the current cleanup scope.
Definition at line 410 of file EHScopeStack.h.
References hasNormalCleanups().
|
inline |
Returns an iterator pointing to the innermost EH scope.
Definition at line 615 of file CGCleanup.h.
Referenced by containsOnlyLifetimeMarkers(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), popCatch(), popCleanup(), popFilter(), and popTerminate().
|
inline |
Clears the branch-fixups list.
This should only be called by ResolveAllBranchFixups.
Definition at line 429 of file EHScopeStack.h.
Referenced by ResolveAllBranchFixups().
bool EHScopeStack::containsOnlyLifetimeMarkers | ( | EHScopeStack::stable_iterator | Old | ) | const |
Definition at line 115 of file CGCleanup.cpp.
References begin(), and stabilize().
|
inline |
Determines whether the exception-scopes stack is empty.
Definition at line 359 of file EHScopeStack.h.
Referenced by popCatch(), popCleanup(), popFilter(), and popTerminate().
|
inline |
Returns an iterator pointing to the outermost EH scope.
Definition at line 619 of file CGCleanup.h.
|
inline |
Turn a stable reference to a scope depth into a unstable pointer to the EH stack.
Definition at line 639 of file CGCleanup.h.
References clang::CodeGen::EHScopeStack::stable_iterator::isValid(), and stable_begin().
Referenced by getInnermostActiveNormalCleanup(), IsUsedAsEHCleanup(), popNullFixups(), requiresLandingPad(), and SetupCleanupBlockActivation().
|
inline |
Definition at line 417 of file EHScopeStack.h.
References getNumBranchFixups().
Referenced by ResolveAllBranchFixups().
EHScopeStack::stable_iterator EHScopeStack::getInnermostActiveNormalCleanup | ( | ) | const |
Definition at line 141 of file CGCleanup.cpp.
References find(), getInnermostNormalCleanup(), and