clang 22.0.0git
clang::CIRGen::EHScopeStack Class Reference

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/CIR/CodeGen/EHScopeStack.h"

Classes

class  Cleanup
 Information for lazily generating a 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 ()=default
 ~EHScopeStack ()=default
template<class T, class... As>
void pushCleanup (CleanupKind kind, As... a)
 Push a lazily-created cleanup on the stack.
void setCGF (CIRGenFunction *inCGF)
void popCleanup ()
 Pops a cleanup scope off the stack. This is private to CIRGenCleanup.cpp.
class EHCatchScopepushCatch (unsigned numHandlers)
 Push a set of catch handlers on the stack.
void popCatch ()
 Pops a catch scope off the stack. This is private to CIRGenException.cpp.
bool empty () const
 Determines whether the exception-scopes stack is empty.
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.
iterator find (stable_iterator savePoint) const
 Turn a stable reference to a scope depth into a unstable pointer to the EH stack.
BranchFixupaddBranchFixup ()
 Add a branch fixup to the current cleanup scope.
unsigned getNumBranchFixups () const
BranchFixupgetBranchFixup (unsigned i)
void popNullFixups ()
 Pops lazily-removed fixups from the end of the list.

Static Public Member Functions

static stable_iterator stable_end ()
 Create a stable reference to the bottom of the EH stack.

Friends

class CIRGenFunction

Detailed Description

A stack of scopes which respond to exceptions, including cleanups and catch blocks.

Definition at line 70 of file EHScopeStack.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ScopeStackAlignment 

Definition at line 75 of file EHScopeStack.h.

Constructor & Destructor Documentation

◆ EHScopeStack()

clang::CIRGen::EHScopeStack::EHScopeStack ( )
default

◆ ~EHScopeStack()

clang::CIRGen::EHScopeStack::~EHScopeStack ( )
default

Member Function Documentation

◆ addBranchFixup()

BranchFixup & clang::CIRGen::EHScopeStack::addBranchFixup ( )
inline

Add a branch fixup to the current cleanup scope.

Definition at line 259 of file EHScopeStack.h.

References hasNormalCleanups().

◆ begin()

EHScopeStack::iterator clang::CIRGen::EHScopeStack::begin ( ) const
inline

Returns an iterator pointing to the innermost EH scope.

Definition at line 296 of file CIRGenCleanup.h.

Referenced by popCatch().

◆ empty()

bool clang::CIRGen::EHScopeStack::empty ( ) const
inline

Determines whether the exception-scopes stack is empty.

Definition at line 218 of file EHScopeStack.h.

Referenced by popCatch().

◆ end()

EHScopeStack::iterator clang::CIRGen::EHScopeStack::end ( ) const
inline

Returns an iterator pointing to the outermost EH scope.

Definition at line 300 of file CIRGenCleanup.h.

◆ find()

EHScopeStack::iterator clang::CIRGen::EHScopeStack::find ( stable_iterator savePoint) const
inline

Turn a stable reference to a scope depth into a unstable pointer to the EH stack.

Definition at line 305 of file CIRGenCleanup.h.

References clang::CIRGen::EHScopeStack::stable_iterator::isValid(), and stable_begin().

◆ getBranchFixup()

BranchFixup & clang::CIRGen::EHScopeStack::getBranchFixup ( unsigned i)
inline

Definition at line 266 of file EHScopeStack.h.

References getNumBranchFixups().

◆ getInnermostActiveNormalCleanup()

stable_iterator clang::CIRGen::EHScopeStack::getInnermostActiveNormalCleanup ( ) const

◆ getInnermostEHScope()

stable_iterator clang::CIRGen::EHScopeStack::getInnermostEHScope ( ) const
inline

Definition at line 232 of file EHScopeStack.h.

◆ getInnermostNormalCleanup()

stable_iterator clang::CIRGen::EHScopeStack::getInnermostNormalCleanup ( ) const
inline

Returns the innermost normal cleanup on the stack, or stable_end() if there are no normal cleanups.

Definition at line 227 of file EHScopeStack.h.

◆ getNumBranchFixups()

unsigned clang::CIRGen::EHScopeStack::getNumBranchFixups ( ) const
inline

Definition at line 265 of file EHScopeStack.h.

Referenced by getBranchFixup().

◆ hasNormalCleanups()

bool clang::CIRGen::EHScopeStack::hasNormalCleanups ( ) const
inline

Determines whether there are any normal cleanups on the stack.

Definition at line 221 of file EHScopeStack.h.

References stable_end().

Referenced by addBranchFixup().

◆ popCatch()

void clang::CIRGen::EHScopeStack::popCatch ( )
inline

◆ popCleanup()

void clang::CIRGen::EHScopeStack::popCleanup ( )

Pops a cleanup scope off the stack. This is private to CIRGenCleanup.cpp.

◆ popNullFixups()

void clang::CIRGen::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.

◆ pushCatch()

class EHCatchScope * clang::CIRGen::EHScopeStack::pushCatch ( unsigned numHandlers)

Push a set of catch handlers on the stack.

The catch is uninitialized and will need to have the given number of handlers set on it.

◆ pushCleanup()

template<class T, class... As>
void clang::CIRGen::EHScopeStack::pushCleanup ( CleanupKind kind,
As... a )
inline

Push a lazily-created cleanup on the stack.

Definition at line 197 of file EHScopeStack.h.

References ScopeStackAlignment, and clang::T.

◆ setCGF()

void clang::CIRGen::EHScopeStack::setCGF ( CIRGenFunction * inCGF)
inline

Definition at line 204 of file EHScopeStack.h.

References CIRGenFunction.

◆ stable_begin()

stable_iterator clang::CIRGen::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 247 of file EHScopeStack.h.

Referenced by find().

◆ stable_end()

stable_iterator clang::CIRGen::EHScopeStack::stable_end ( )
inlinestatic

Create a stable reference to the bottom of the EH stack.

Definition at line 252 of file EHScopeStack.h.

Referenced by hasNormalCleanups().

◆ CIRGenFunction

friend class CIRGenFunction
friend

Definition at line 71 of file EHScopeStack.h.

References CIRGenFunction.

Referenced by CIRGenFunction, clang::CIRGen::EHScopeStack::Cleanup::emit(), and setCGF().


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