class EHScopeStack
Declaration
class EHScopeStack { /* full declaration omitted */ };
Description
A stack of scopes which respond to exceptions, including cleanups and catch blocks.
Declared at: clang/lib/CodeGen/EHScopeStack.h:94
Member Variables
- private char* StartOfBuffer
- The start of the scope-stack buffer, i.e. the allocated pointer for the buffer. All of these pointers are either simultaneously null or simultaneously valid.
- private char* EndOfBuffer
- The end of the buffer.
- private char* StartOfData
- The first valid entry in the buffer.
- private clang::CodeGen::EHScopeStack::stable_iterator InnermostNormalCleanup
- The innermost normal cleanup on the stack.
- private clang::CodeGen::EHScopeStack::stable_iterator InnermostEHScope
- The innermost EH scope on the stack.
- private clang::CodeGen::CodeGenFunction* CGF
- The CGF this Stack belong to
- private SmallVector<clang::CodeGen::BranchFixup, 8> BranchFixups
- Note that branches are allowed to jump into protected scopes in certain situations; e.g. the following code is legal: struct A { ~A(); }; // trivial ctor, non-trivial dtor goto foo; A a; foo: bar();
Method Overview
- public EHScopeStack()
- public clang::CodeGen::BranchFixup & addBranchFixup()
- private char * allocate(size_t Size)
- public clang::CodeGen::EHScopeStack::iterator begin() const
- public void clearFixups()
- public bool containsOnlyLifetimeMarkers(clang::CodeGen::EHScopeStack::stable_iterator Old) const
- private void deallocate(size_t Size)
- public bool empty() const
- public clang::CodeGen::EHScopeStack::iterator end() const
- public clang::CodeGen::EHScopeStack::iterator find(clang::CodeGen::EHScopeStack::stable_iterator save) const
- public clang::CodeGen::BranchFixup & getBranchFixup(unsigned int I)
- public clang::CodeGen::EHScopeStack::stable_iterator getInnermostActiveNormalCleanup() const
- public clang::CodeGen::EHScopeStack::stable_iterator getInnermostEHScope() const
- public clang::CodeGen::EHScopeStack::stable_iterator getInnermostNormalCleanup() const
- public unsigned int getNumBranchFixups() const
- public bool hasNormalCleanups() const
- public void popCatch()
- public void popCleanup()
- public void popFilter()
- public void popNullFixups()
- public void popTerminate()
- public class EHCatchScope * pushCatch(unsigned int NumHandlers)
- public template <class T, class... As>void pushCleanup(clang::CodeGen::CleanupKind Kind, As... A)
- private void * pushCleanup(clang::CodeGen::CleanupKind K, size_t DataSize)
- public template <class T, class... As>void pushCleanupTuple(clang::CodeGen::CleanupKind Kind, std::tuple<As...> A)
- public template <class T, class... As>T * pushCleanupWithExtra(clang::CodeGen::CleanupKind Kind, size_t N, As... A)
- public void pushCopyOfCleanup(clang::CodeGen::CleanupKind Kind, const void * Cleanup, size_t Size)
- public class EHFilterScope * pushFilter(unsigned int NumFilters)
- public void pushTerminate()
- public bool requiresLandingPad() const
- public void setCGF(clang::CodeGen::CodeGenFunction * inCGF)
- public clang::CodeGen::EHScopeStack::stable_iterator stabilize(clang::CodeGen::EHScopeStack::iterator it) const
- public clang::CodeGen::EHScopeStack::stable_iterator stable_begin() const
- public static clang::CodeGen::EHScopeStack::stable_iterator stable_end()
- public ~EHScopeStack()
Methods
¶EHScopeStack()
EHScopeStack()
Declared at: clang/lib/CodeGen/EHScopeStack.h:269
¶clang::CodeGen::BranchFixup& addBranchFixup()
clang::CodeGen::BranchFixup& addBranchFixup()
Description
Add a branch fixup to the current cleanup scope.
Declared at: clang/lib/CodeGen/EHScopeStack.h:401
¶char* allocate(size_t Size)
char* allocate(size_t Size)
Declared at: clang/lib/CodeGen/EHScopeStack.h:263
Parameters
- size_t Size
¶clang::CodeGen::EHScopeStack::iterator begin()
const
clang::CodeGen::EHScopeStack::iterator begin()
const
Description
Returns an iterator pointing to the innermost EH scope.
Declared at: clang/lib/CodeGen/EHScopeStack.h:376
¶void clearFixups()
void clearFixups()
Description
Clears the branch-fixups list. This should only be called by ResolveAllBranchFixups.
Declared at: clang/lib/CodeGen/EHScopeStack.h:420
¶bool containsOnlyLifetimeMarkers(
clang::CodeGen::EHScopeStack::stable_iterator
Old) const
bool containsOnlyLifetimeMarkers(
clang::CodeGen::EHScopeStack::stable_iterator
Old) const
Declared at: clang/lib/CodeGen/EHScopeStack.h:347
Parameters
¶void deallocate(size_t Size)
void deallocate(size_t Size)
Declared at: clang/lib/CodeGen/EHScopeStack.h:264
Parameters
- size_t Size
¶bool empty() const
bool empty() const
Description
Determines whether the exception-scopes stack is empty.
Declared at: clang/lib/CodeGen/EHScopeStack.h:350
¶clang::CodeGen::EHScopeStack::iterator end() const
clang::CodeGen::EHScopeStack::iterator end() const
Description
Returns an iterator pointing to the outermost EH scope.
Declared at: clang/lib/CodeGen/EHScopeStack.h:379
¶clang::CodeGen::EHScopeStack::iterator find(
clang::CodeGen::EHScopeStack::stable_iterator
save) const
clang::CodeGen::EHScopeStack::iterator find(
clang::CodeGen::EHScopeStack::stable_iterator
save) const
Description
Turn a stable reference to a scope depth into a unstable pointer to the EH stack.
Declared at: clang/lib/CodeGen/EHScopeStack.h:398
Parameters
¶clang::CodeGen::BranchFixup& getBranchFixup(
unsigned int I)
clang::CodeGen::BranchFixup& getBranchFixup(
unsigned int I)
Declared at: clang/lib/CodeGen/EHScopeStack.h:408
Parameters
- unsigned int I
¶clang::CodeGen::EHScopeStack::stable_iterator
getInnermostActiveNormalCleanup() const
clang::CodeGen::EHScopeStack::stable_iterator
getInnermostActiveNormalCleanup() const
Declared at: clang/lib/CodeGen/EHScopeStack.h:364
¶clang::CodeGen::EHScopeStack::stable_iterator
getInnermostEHScope() const
clang::CodeGen::EHScopeStack::stable_iterator
getInnermostEHScope() const
Declared at: clang/lib/CodeGen/EHScopeStack.h:366
¶clang::CodeGen::EHScopeStack::stable_iterator
getInnermostNormalCleanup() const
clang::CodeGen::EHScopeStack::stable_iterator
getInnermostNormalCleanup() const
Description
Returns the innermost normal cleanup on the stack, or stable_end() if there are no normal cleanups.
Declared at: clang/lib/CodeGen/EHScopeStack.h:361
¶unsigned int getNumBranchFixups() const
unsigned int getNumBranchFixups() const
Declared at: clang/lib/CodeGen/EHScopeStack.h:407
¶bool hasNormalCleanups() const
bool hasNormalCleanups() const
Description
Determines whether there are any normal cleanups on the stack.
Declared at: clang/lib/CodeGen/EHScopeStack.h:355
¶void popCatch()
void popCatch()
Description
Pops a catch scope off the stack. This is private to CGException.cpp.
Declared at: clang/lib/CodeGen/EHScopeStack.h:331
¶void popCleanup()
void popCleanup()
Description
Pops a cleanup scope off the stack. This is private to CGCleanup.cpp.
Declared at: clang/lib/CodeGen/EHScopeStack.h:323
¶void popFilter()
void popFilter()
Description
Pops an exceptions filter off the stack.
Declared at: clang/lib/CodeGen/EHScopeStack.h:337
¶void popNullFixups()
void popNullFixups()
Description
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.
Declared at: clang/lib/CodeGen/EHScopeStack.h:416
¶void popTerminate()
void popTerminate()
Description
Pops a terminate handler off the stack.
Declared at: clang/lib/CodeGen/EHScopeStack.h:343
¶class EHCatchScope* pushCatch(
unsigned int NumHandlers)
class EHCatchScope* pushCatch(
unsigned int NumHandlers)
Description
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.
Declared at: clang/lib/CodeGen/EHScopeStack.h:328
Parameters
- unsigned int NumHandlers
¶template <class T, class... As>
void pushCleanup(clang::CodeGen::CleanupKind Kind,
As... A)
template <class T, class... As>
void pushCleanup(clang::CodeGen::CleanupKind Kind,
As... A)
Description
Push a lazily-created cleanup on the stack.
Declared at: clang/lib/CodeGen/EHScopeStack.h:276
Templates
- T
- As
Parameters
- clang::CodeGen::CleanupKind Kind
- As... A
¶void* pushCleanup(clang::CodeGen::CleanupKind K,
size_t DataSize)
void* pushCleanup(clang::CodeGen::CleanupKind K,
size_t DataSize)
Declared at: clang/lib/CodeGen/EHScopeStack.h:266
Parameters
- clang::CodeGen::CleanupKind K
- size_t DataSize
¶template <class T, class... As>
void pushCleanupTuple(
clang::CodeGen::CleanupKind Kind,
std::tuple<As...> A)
template <class T, class... As>
void pushCleanupTuple(
clang::CodeGen::CleanupKind Kind,
std::tuple<As...> A)
Description
Push a lazily-created cleanup on the stack. Tuple version.
Declared at: clang/lib/CodeGen/EHScopeStack.h:286
Templates
- T
- As
Parameters
- clang::CodeGen::CleanupKind Kind
- std::tuple<As...> A
¶template <class T, class... As>
T* pushCleanupWithExtra(
clang::CodeGen::CleanupKind Kind,
size_t N,
As... A)
template <class T, class... As>
T* pushCleanupWithExtra(
clang::CodeGen::CleanupKind Kind,
size_t N,
As... A)
Description
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.
Declared at: clang/lib/CodeGen/EHScopeStack.h:308
Templates
- T
- As
Parameters
- clang::CodeGen::CleanupKind Kind
- size_t N
- As... A
¶void pushCopyOfCleanup(
clang::CodeGen::CleanupKind Kind,
const void* Cleanup,
size_t Size)
void pushCopyOfCleanup(
clang::CodeGen::CleanupKind Kind,
const void* Cleanup,
size_t Size)
Declared at: clang/lib/CodeGen/EHScopeStack.h:315
Parameters
- clang::CodeGen::CleanupKind Kind
- const void* Cleanup
- size_t Size
¶class EHFilterScope* pushFilter(
unsigned int NumFilters)
class EHFilterScope* pushFilter(
unsigned int NumFilters)
Description
Push an exceptions filter on the stack.
Declared at: clang/lib/CodeGen/EHScopeStack.h:334
Parameters
- unsigned int NumFilters
¶void pushTerminate()
void pushTerminate()
Description
Push a terminate handler on the stack.
Declared at: clang/lib/CodeGen/EHScopeStack.h:340
¶bool requiresLandingPad() const
bool requiresLandingPad() const
Declared at: clang/lib/CodeGen/EHScopeStack.h:352
¶void setCGF(
clang::CodeGen::CodeGenFunction* inCGF)
void setCGF(
clang::CodeGen::CodeGenFunction* inCGF)
Declared at: clang/lib/CodeGen/EHScopeStack.h:320
Parameters
¶clang::CodeGen::EHScopeStack::stable_iterator
stabilize(clang::CodeGen::EHScopeStack::iterator
it) const
clang::CodeGen::EHScopeStack::stable_iterator
stabilize(clang::CodeGen::EHScopeStack::iterator
it) const
Description
Translates an iterator into a stable_iterator.
Declared at: clang/lib/CodeGen/EHScopeStack.h:394
Parameters
¶clang::CodeGen::EHScopeStack::stable_iterator
stable_begin() const
clang::CodeGen::EHScopeStack::stable_iterator
stable_begin() const
Description
Create a stable reference to the top of the EH stack. The returned reference is valid until that scope is popped off the stack.
Declared at: clang/lib/CodeGen/EHScopeStack.h:384
¶static clang::CodeGen::EHScopeStack::
stable_iterator
stable_end()
static clang::CodeGen::EHScopeStack::
stable_iterator
stable_end()
Description
Create a stable reference to the bottom of the EH stack.
Declared at: clang/lib/CodeGen/EHScopeStack.h:389
¶~EHScopeStack()
~EHScopeStack()
Declared at: clang/lib/CodeGen/EHScopeStack.h:273