clang: clang::CodeGen::EHScopeStack Class Reference (original) (raw)
A stack of scopes which respond to exceptions, including cleanups and catch blocks. More...
#include "[/work/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CodeGen/EHScopeStack.h](CodeGen%5F2EHScopeStack%5F8h%5Fsource.html)"
| Classes | |
|---|---|
| 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 | |
|---|---|
| class LLVM_MOVABLE_POLYMORPHIC_TYPE | alignas (uint64_t) Cleanup |
| Information for lazily generating a cleanup. | |
| 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 | containsOnlyNoopCleanups (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 99 of file EHScopeStack.h.
◆ anonymous enum
| clang::CodeGen::EHScopeStack::EHScopeStack ( ) | inline |
|---|
◆ ~EHScopeStack()
| clang::CodeGen::EHScopeStack::~EHScopeStack ( ) | inline |
|---|
◆ EHScopeStack() [2/2]
| clang::CodeGen::EHScopeStack::EHScopeStack ( const EHScopeStack & ) | delete |
|---|
◆ addBranchFixup()
| BranchFixup & clang::CodeGen::EHScopeStack::addBranchFixup ( ) | inline |
|---|
◆ alignas()
| class LLVM_MOVABLE_POLYMORPHIC_TYPE clang::CodeGen::EHScopeStack::alignas ( uint64_t ) | inline |
|---|
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.
Generation flags.
isForEH - true if the current emission is for an EH cleanup.
isEHCleanupKind - true if the cleanup was pushed as an EH cleanup.
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.
Definition at line 146 of file EHScopeStack.h.
References alignas(), and operator=().
Referenced by alignas().
◆ begin()
◆ clearFixups()
| void clang::CodeGen::EHScopeStack::clearFixups ( ) | inline |
|---|
◆ containsOnlyNoopCleanups()
◆ empty()
| bool clang::CodeGen::EHScopeStack::empty ( ) const | inline |
|---|
◆ end()
Returns an iterator pointing to the outermost EH scope.
Definition at line 627 of file CGCleanup.h.
◆ find()
◆ getBranchFixup()
◆ getInnermostActiveNormalCleanup()
| stable_iterator clang::CodeGen::EHScopeStack::getInnermostActiveNormalCleanup | ( | ) | const |
|---|
◆ getInnermostEHScope()
| stable_iterator clang::CodeGen::EHScopeStack::getInnermostEHScope ( ) const | inline |
|---|
◆ getInnermostNormalCleanup()
| stable_iterator clang::CodeGen::EHScopeStack::getInnermostNormalCleanup ( ) const | inline |
|---|
Returns the innermost normal cleanup on the stack, or stable_end() if there are no normal cleanups.
Definition at line 375 of file EHScopeStack.h.
◆ getNumBranchFixups()
| unsigned clang::CodeGen::EHScopeStack::getNumBranchFixups ( ) const | inline |
|---|
◆ hasNormalCleanups()
| bool clang::CodeGen::EHScopeStack::hasNormalCleanups ( ) const | inline |
|---|
◆ operator=()
◆ popCatch()
| void clang::CodeGen::EHScopeStack::popCatch ( ) | inline |
|---|
◆ popCleanup()
| void clang::CodeGen::EHScopeStack::popCleanup | ( | ) |
|---|
Pops a cleanup scope off the stack. This is private to CGCleanup.cpp.
◆ popFilter()
| void clang::CodeGen::EHScopeStack::popFilter | ( | ) |
|---|
Pops an exceptions filter off the stack.
◆ popNullFixups()
| void clang::CodeGen::EHScopeStack::popNullFixups | ( | ) |
|---|
Pops lazily-removed fixups from the end of the list.
This should only be called by procedures which have just popped a cleanup or resolved one or more fixups.
◆ popTerminate()
| void clang::CodeGen::EHScopeStack::popTerminate ( ) | inline |
|---|
◆ pushCatch()
◆ pushCleanup()
template<class T, class... As>
| void clang::CodeGen::EHScopeStack::pushCleanup ( CleanupKind Kind, As... A ) | inline |
|---|
◆ pushCleanupTuple()
template<class T, class... As>
| void clang::CodeGen::EHScopeStack::pushCleanupTuple ( CleanupKind Kind, std::tuple< As... > A ) | inline |
|---|
◆ pushCleanupWithExtra()
template<class T, class... As>
| T * clang::CodeGen::EHScopeStack::pushCleanupWithExtra ( CleanupKind Kind, size_t N, As... A ) | inline |
|---|
Push a cleanup with non-constant storage requirements on the stack.
The cleanup type must provide an additional static method: static size_t getExtraSize(size_t); The argument to this method will be the value N, which will also be passed as the first argument to the constructor.
The data stored in the extra storage must obey the same restrictions as normal cleanup member data.
The pointer returned from this method is valid until the cleanup stack is modified.
Definition at line 322 of file EHScopeStack.h.
References ScopeStackAlignment, and clang::T.
Referenced by EnterNewDeleteCleanup().
◆ pushCopyOfCleanup()
| void clang::CodeGen::EHScopeStack::pushCopyOfCleanup ( CleanupKind Kind, const void * Cleanup, size_t Size ) | inline |
|---|
◆ pushFilter()
Push an exceptions filter on the stack.
◆ pushTerminate()
| void clang::CodeGen::EHScopeStack::pushTerminate | ( | ) |
|---|
◆ requiresLandingPad()
| bool clang::CodeGen::EHScopeStack::requiresLandingPad | ( | ) | const |
|---|
◆ setCGF()
| void clang::CodeGen::EHScopeStack::setCGF ( CodeGenFunction * inCGF) | inline |
|---|
◆ stabilize()
◆ stable_begin()
| stable_iterator clang::CodeGen::EHScopeStack::stable_begin ( ) const | inline |
|---|
Create a stable reference to the top of the EH stack.
The returned reference is valid until that scope is popped off the stack.
Definition at line 398 of file EHScopeStack.h.
Referenced by find().
◆ stable_end()
The documentation for this class was generated from the following files:
- lib/CodeGen/EHScopeStack.h
- lib/CodeGen/CGCleanup.h