class EHCleanupScope
Declaration
class EHCleanupScope : public EHScope { /* full declaration omitted */ };
Description
A cleanup scope which generates the cleanup blocks lazily.
Declared at: clang/lib/CodeGen/CGCleanup.h:231
Inherits from: EHScope
Member Variables
- private EHScopeStack::stable_iterator EnclosingNormal
- The nearest normal cleanup scope enclosing this one.
- private EHScopeStack::stable_iterator EnclosingEH
- The nearest EH scope enclosing this one.
- private llvm::BasicBlock* NormalBlock
- The dual entry/exit block along the normal edge. This is lazily created if needed before the cleanup is popped.
- private clang::CodeGen::Address ActiveFlag
- An optional i1 variable indicating whether this cleanup has been activated yet.
- private struct ExtInfo* ExtInfo
- private unsigned int FixupDepth
- The number of fixups required by enclosing scopes (not including this one). If this is the top cleanup scope, all the fixups from this index onwards belong to this scope.
Inherited from EHScope:
Method Overview
- public void Destroy()
- public EHCleanupScope(bool isNormal, bool isEH, unsigned int cleanupSize, unsigned int fixupDepth, EHScopeStack::stable_iterator enclosingNormal, EHScopeStack::stable_iterator enclosingEH)
- public void addBranchAfter(llvm::ConstantInt * Index, llvm::BasicBlock * Block)
- public bool addBranchThrough(llvm::BasicBlock * Block)
- public static bool classof(const clang::CodeGen::EHScope * Scope)
- public clang::CodeGen::Address getActiveFlag() const
- public size_t getAllocatedSize() const
- public llvm::BasicBlock * getBranchAfterBlock(unsigned int I) const
- public llvm::ConstantInt * getBranchAfterIndex(unsigned int I) const
- public EHScopeStack::Cleanup * getCleanup()
- public void * getCleanupBuffer()
- public size_t getCleanupSize() const
- public EHScopeStack::stable_iterator getEnclosingNormalCleanup() const
- private const struct ExtInfo & getExtInfo() const
- private struct ExtInfo & getExtInfo()
- public unsigned int getFixupDepth() const
- public llvm::BasicBlock * getNormalBlock() const
- public unsigned int getNumBranchAfters() const
- public static size_t getSizeForCleanupSize(size_t Size)
- public bool hasActiveFlag() const
- public bool hasBranchThroughs() const
- public bool hasBranches() const
- public bool isActive() const
- public bool isEHCleanup() const
- public bool isLifetimeMarker() const
- public bool isNormalCleanup() const
- public void setActive(bool A)
- public void setActiveFlag(clang::CodeGen::Address Var)
- public void setLifetimeMarker()
- public void setNormalBlock(llvm::BasicBlock * BB)
- public void setTestFlagInEHCleanup()
- public void setTestFlagInNormalCleanup()
- public bool shouldTestFlagInEHCleanup() const
- public bool shouldTestFlagInNormalCleanup() const
- public ~EHCleanupScope()
Inherited from EHScope:
- public getCachedEHDispatchBlock
- public getCachedLandingPad
- public getEnclosingEHScope
- public getKind
- public hasEHBranches
- public setCachedEHDispatchBlock
- public setCachedLandingPad
Methods
¶void Destroy()
void Destroy()
Declared at: clang/lib/CodeGen/CGCleanup.h:305
¶EHCleanupScope(
bool isNormal,
bool isEH,
unsigned int cleanupSize,
unsigned int fixupDepth,
EHScopeStack::stable_iterator enclosingNormal,
EHScopeStack::stable_iterator enclosingEH)
EHCleanupScope(
bool isNormal,
bool isEH,
unsigned int cleanupSize,
unsigned int fixupDepth,
EHScopeStack::stable_iterator enclosingNormal,
EHScopeStack::stable_iterator enclosingEH)
Declared at: clang/lib/CodeGen/CGCleanup.h:286
Parameters
- bool isNormal
- bool isEH
- unsigned int cleanupSize
- unsigned int fixupDepth
- EHScopeStack::stable_iterator enclosingNormal
- EHScopeStack::stable_iterator enclosingEH
¶void addBranchAfter(llvm::ConstantInt* Index,
llvm::BasicBlock* Block)
void addBranchAfter(llvm::ConstantInt* Index,
llvm::BasicBlock* Block)
Description
Add a branch-after to this cleanup scope. A branch-after is a branch from a point protected by this (normal) cleanup to a point in the normal cleanup scope immediately containing it. For example, for (;;) { A a; break; } contains a branch-after. Branch-afters each have their own destination out of the cleanup, guaranteed distinct from anything else threaded through it. Therefore branch-afters usually force a switch after the cleanup.
Declared at: clang/lib/CodeGen/CGCleanup.h:372
Parameters
- llvm::ConstantInt* Index
- llvm::BasicBlock* Block
¶bool addBranchThrough(llvm::BasicBlock* Block)
bool addBranchThrough(llvm::BasicBlock* Block)
Description
Add a branch-through to this cleanup scope. A branch-through is a branch from a scope protected by this (normal) cleanup to an enclosing scope other than the immediately-enclosing normal cleanup scope. In the following example, the branch through B's scope is a branch-through, while the branch through A's scope is a branch-after: for (;;) { A a; B b; break; } All branch-throughs have a common destination out of the cleanup, one possibly shared with the fall-through. Therefore branch-throughs usually don't force a switch after the cleanup.
Declared at: clang/lib/CodeGen/CGCleanup.h:409
Parameters
- llvm::BasicBlock* Block
Returns
true if the branch-through was new to this scope
¶static bool classof(
const clang::CodeGen::EHScope* Scope)
static bool classof(
const clang::CodeGen::EHScope* Scope)
Declared at: clang/lib/CodeGen/CGCleanup.h:419
Parameters
- const clang::CodeGen::EHScope* Scope
¶clang::CodeGen::Address getActiveFlag() const
clang::CodeGen::Address getActiveFlag() const
Declared at: clang/lib/CodeGen/CGCleanup.h:324
¶size_t getAllocatedSize() const
size_t getAllocatedSize() const
Declared at: clang/lib/CodeGen/CGCleanup.h:282
¶llvm::BasicBlock* getBranchAfterBlock(
unsigned int I) const
llvm::BasicBlock* getBranchAfterBlock(
unsigned int I) const
Declared at: clang/lib/CodeGen/CGCleanup.h:384
Parameters
- unsigned int I
¶llvm::ConstantInt* getBranchAfterIndex(
unsigned int I) const
llvm::ConstantInt* getBranchAfterIndex(
unsigned int I) const
Declared at: clang/lib/CodeGen/CGCleanup.h:389
Parameters
- unsigned int I
¶EHScopeStack::Cleanup* getCleanup()
EHScopeStack::Cleanup* getCleanup()
Declared at: clang/lib/CodeGen/CGCleanup.h:354
¶void* getCleanupBuffer()
void* getCleanupBuffer()
Declared at: clang/lib/CodeGen/CGCleanup.h:352
¶size_t getCleanupSize() const
size_t getCleanupSize() const
Declared at: clang/lib/CodeGen/CGCleanup.h:351
¶EHScopeStack::stable_iterator
getEnclosingNormalCleanup() const
EHScopeStack::stable_iterator
getEnclosingNormalCleanup() const
Declared at: clang/lib/CodeGen/CGCleanup.h:347
¶const struct ExtInfo& getExtInfo() const
const struct ExtInfo& getExtInfo() const
Declared at: clang/lib/CodeGen/CGCleanup.h:270
¶struct ExtInfo& getExtInfo()
struct ExtInfo& getExtInfo()
Declared at: clang/lib/CodeGen/CGCleanup.h:265
¶unsigned int getFixupDepth() const
unsigned int getFixupDepth() const
Declared at: clang/lib/CodeGen/CGCleanup.h:346
¶llvm::BasicBlock* getNormalBlock() const
llvm::BasicBlock* getNormalBlock() const
Declared at: clang/lib/CodeGen/CGCleanup.h:312
¶unsigned int getNumBranchAfters() const
unsigned int getNumBranchAfters() const
Description
Return the number of unique branch-afters on this scope.
Declared at: clang/lib/CodeGen/CGCleanup.h:380
¶static size_t getSizeForCleanupSize(size_t Size)
static size_t getSizeForCleanupSize(size_t Size)
Description
Gets the size required for a lazy cleanup scope with the given cleanup-data requirements.
Declared at: clang/lib/CodeGen/CGCleanup.h:278
Parameters
- size_t Size
¶bool hasActiveFlag() const
bool hasActiveFlag() const
Declared at: clang/lib/CodeGen/CGCleanup.h:323
¶bool hasBranchThroughs() const
bool hasBranchThroughs() const
Description
Determines if this cleanup scope has any branch throughs.
Declared at: clang/lib/CodeGen/CGCleanup.h:414
¶bool hasBranches() const
bool hasBranches() const
Description
True if this cleanup scope has any branch-afters or branch-throughs.
Declared at: clang/lib/CodeGen/CGCleanup.h:359
¶bool isActive() const
bool isActive() const
Declared at: clang/lib/CodeGen/CGCleanup.h:317
¶bool isEHCleanup() const
bool isEHCleanup() const
Declared at: clang/lib/CodeGen/CGCleanup.h:315
¶bool isLifetimeMarker() const
bool isLifetimeMarker() const
Declared at: clang/lib/CodeGen/CGCleanup.h:320
¶bool isNormalCleanup() const
bool isNormalCleanup() const
Declared at: clang/lib/CodeGen/CGCleanup.h:311
¶void setActive(bool A)
void setActive(bool A)
Declared at: clang/lib/CodeGen/CGCleanup.h:318
Parameters
- bool A
¶void setActiveFlag(clang::CodeGen::Address Var)
void setActiveFlag(clang::CodeGen::Address Var)
Declared at: clang/lib/CodeGen/CGCleanup.h:327
Parameters
¶void setLifetimeMarker()
void setLifetimeMarker()
Declared at: clang/lib/CodeGen/CGCleanup.h:321
¶void setNormalBlock(llvm::BasicBlock* BB)
void setNormalBlock(llvm::BasicBlock* BB)
Declared at: clang/lib/CodeGen/CGCleanup.h:313
Parameters
- llvm::BasicBlock* BB
¶void setTestFlagInEHCleanup()
void setTestFlagInEHCleanup()
Declared at: clang/lib/CodeGen/CGCleanup.h:339
¶void setTestFlagInNormalCleanup()
void setTestFlagInNormalCleanup()
Declared at: clang/lib/CodeGen/CGCleanup.h:332
¶bool shouldTestFlagInEHCleanup() const
bool shouldTestFlagInEHCleanup() const
Declared at: clang/lib/CodeGen/CGCleanup.h:342
¶bool shouldTestFlagInNormalCleanup() const
bool shouldTestFlagInNormalCleanup() const
Declared at: clang/lib/CodeGen/CGCleanup.h:335
¶~EHCleanupScope()
~EHCleanupScope()
Declared at: clang/lib/CodeGen/CGCleanup.h:309