clang API Documentation
A cleanup scope which generates the cleanup blocks lazily. More...
#include <CGCleanup.h>


Classes | |
| struct | ExtInfo |
Public Member Functions | |
| size_t | getAllocatedSize () const |
| EHCleanupScope (bool isNormal, bool isEH, bool isActive, unsigned cleanupSize, unsigned fixupDepth, EHScopeStack::stable_iterator enclosingNormal, EHScopeStack::stable_iterator enclosingEH) | |
| ~EHCleanupScope () | |
| bool | isNormalCleanup () const |
| llvm::BasicBlock * | getNormalBlock () const |
| void | setNormalBlock (llvm::BasicBlock *BB) |
| bool | isEHCleanup () const |
| llvm::BasicBlock * | getEHBlock () const |
| void | setEHBlock (llvm::BasicBlock *BB) |
| bool | isActive () const |
| void | setActive (bool A) |
| llvm::AllocaInst * | getActiveFlag () const |
| void | setActiveFlag (llvm::AllocaInst *Var) |
| void | setTestFlagInNormalCleanup () |
| bool | shouldTestFlagInNormalCleanup () const |
| void | setTestFlagInEHCleanup () |
| bool | shouldTestFlagInEHCleanup () const |
| unsigned | getFixupDepth () const |
| EHScopeStack::stable_iterator | getEnclosingNormalCleanup () const |
| size_t | getCleanupSize () const |
| void * | getCleanupBuffer () |
| EHScopeStack::Cleanup * | getCleanup () |
| bool | hasBranches () const |
| True if this cleanup scope has any branch-afters or branch-throughs. | |
| void | addBranchAfter (llvm::ConstantInt *Index, llvm::BasicBlock *Block) |
| unsigned | getNumBranchAfters () const |
| Return the number of unique branch-afters on this scope. | |
| llvm::BasicBlock * | getBranchAfterBlock (unsigned I) const |
| llvm::ConstantInt * | getBranchAfterIndex (unsigned I) const |
| bool | addBranchThrough (llvm::BasicBlock *Block) |
| bool | hasBranchThroughs () const |
| Determines if this cleanup scope has any branch throughs. | |
Static Public Member Functions | |
| static size_t | getSizeForCleanupSize (size_t Size) |
| static bool | classof (const EHScope *Scope) |
A cleanup scope which generates the cleanup blocks lazily.
Definition at line 205 of file CGCleanup.h.
| clang::CodeGen::EHCleanupScope::EHCleanupScope | ( | bool | isNormal, |
| bool | isEH, | ||
| bool | isActive, | ||
| unsigned | cleanupSize, | ||
| unsigned | fixupDepth, | ||
| EHScopeStack::stable_iterator | enclosingNormal, | ||
| EHScopeStack::stable_iterator | enclosingEH | ||
| ) | [inline] |
Definition at line 255 of file CGCleanup.h.
References clang::CodeGen::EHScope::CleanupBits, and isActive().
Referenced by getAllocatedSize(), and getSizeForCleanupSize().
| clang::CodeGen::EHCleanupScope::~EHCleanupScope | ( | ) | [inline] |
Definition at line 272 of file CGCleanup.h.
Referenced by clang::CodeGen::EHScopeStack::popCleanup().
| void clang::CodeGen::EHCleanupScope::addBranchAfter | ( | llvm::ConstantInt * | Index, |
| llvm::BasicBlock * | Block | ||
| ) | [inline] |
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.
Definition at line 330 of file CGCleanup.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitBranchThroughCleanup().
| bool clang::CodeGen::EHCleanupScope::addBranchThrough | ( | llvm::BasicBlock * | Block | ) | [inline] |
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.
Definition at line 367 of file CGCleanup.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitBranchThroughCleanup().
| static bool clang::CodeGen::EHCleanupScope::classof | ( | const EHScope * | Scope | ) | [inline, static] |
Definition at line 377 of file CGCleanup.h.
References clang::CodeGen::EHScope::Cleanup, and clang::CodeGen::EHScope::getKind().
| llvm::AllocaInst* clang::CodeGen::EHCleanupScope::getActiveFlag | ( | ) | const [inline] |
Definition at line 287 of file CGCleanup.h.
Referenced by clang::CodeGen::CodeGenFunction::initFullExprCleanup(), clang::CodeGen::CodeGenFunction::PopCleanupBlock(), and SetupCleanupBlockActivation().
| size_t clang::CodeGen::EHCleanupScope::getAllocatedSize | ( | ) | const [inline] |
Definition at line 251 of file CGCleanup.h.
References clang::CodeGen::EHScope::CleanupBits, and EHCleanupScope().
Referenced by clang::CodeGen::EHScopeStack::iterator::operator++(), and clang::CodeGen::EHScopeStack::popCleanup().
| llvm::BasicBlock* clang::CodeGen::EHCleanupScope::getBranchAfterBlock | ( | unsigned | I | ) | const [inline] |
Definition at line 342 of file CGCleanup.h.
References getNumBranchAfters().
Referenced by clang::CodeGen::CodeGenFunction::PopCleanupBlock().
| llvm::ConstantInt* clang::CodeGen::EHCleanupScope::getBranchAfterIndex | ( | unsigned | I | ) | const [inline] |
Definition at line 347 of file CGCleanup.h.
References getNumBranchAfters().
Referenced by clang::CodeGen::CodeGenFunction::PopCleanupBlock().
| EHScopeStack::Cleanup* clang::CodeGen::EHCleanupScope::getCleanup | ( | ) | [inline] |
Definition at line 312 of file CGCleanup.h.
References getCleanupBuffer().
| void* clang::CodeGen::EHCleanupScope::getCleanupBuffer | ( | ) | [inline] |
Definition at line 310 of file CGCleanup.h.
Referenced by getCleanup(), and clang::CodeGen::CodeGenFunction::PopCleanupBlock().
| size_t clang::CodeGen::EHCleanupScope::getCleanupSize | ( | ) | const [inline] |
Definition at line 309 of file CGCleanup.h.
References clang::CodeGen::EHScope::CleanupBits.
Referenced by clang::CodeGen::CodeGenFunction::PopCleanupBlock().
| llvm::BasicBlock* clang::CodeGen::EHCleanupScope::getEHBlock | ( | ) | const [inline] |
Definition at line 281 of file CGCleanup.h.
References clang::CodeGen::EHScope::getCachedEHDispatchBlock().
| EHScopeStack::stable_iterator clang::CodeGen::EHCleanupScope::getEnclosingNormalCleanup | ( | ) | const [inline] |
Definition at line 305 of file CGCleanup.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitBranchThroughCleanup(), clang::CodeGen::EHScopeStack::getInnermostActiveNormalCleanup(), clang::CodeGen::EHScopeStack::popCleanup(), clang::CodeGen::CodeGenFunction::PopCleanupBlock(), and clang::CodeGen::CodeGenFunction::PopCleanupBlocks().
| unsigned clang::CodeGen::EHCleanupScope::getFixupDepth | ( | ) | const [inline] |
Definition at line 304 of file CGCleanup.h.
References clang::CodeGen::EHScope::CleanupBits.
Referenced by clang::CodeGen::CodeGenFunction::PopCleanupBlock().
| llvm::BasicBlock* clang::CodeGen::EHCleanupScope::getNormalBlock | ( | ) | const [inline] |
Definition at line 277 of file CGCleanup.h.
Referenced by CreateNormalEntry(), destroyOptimisticNormalEntry(), and clang::CodeGen::CodeGenFunction::PopCleanupBlock().
| unsigned clang::CodeGen::EHCleanupScope::getNumBranchAfters | ( | ) | const [inline] |
Return the number of unique branch-afters on this scope.
Definition at line 338 of file CGCleanup.h.
Referenced by getBranchAfterBlock(), getBranchAfterIndex(), and clang::CodeGen::CodeGenFunction::PopCleanupBlock().
| static size_t clang::CodeGen::EHCleanupScope::getSizeForCleanupSize | ( | size_t | Size | ) | [inline, static] |
Gets the size required for a lazy cleanup scope with the given cleanup-data requirements.
Definition at line 247 of file CGCleanup.h.
References EHCleanupScope().
| bool clang::CodeGen::EHCleanupScope::hasBranches | ( | ) | const [inline] |
True if this cleanup scope has any branch-afters or branch-throughs.
Definition at line 317 of file CGCleanup.h.
Referenced by clang::CodeGen::CodeGenFunction::PopCleanupBlock().
| bool clang::CodeGen::EHCleanupScope::hasBranchThroughs | ( | ) | const [inline] |
Determines if this cleanup scope has any branch throughs.
Definition at line 372 of file CGCleanup.h.
Referenced by clang::CodeGen::CodeGenFunction::PopCleanupBlock().
| bool clang::CodeGen::EHCleanupScope::isActive | ( | ) | const [inline] |
Definition at line 284 of file CGCleanup.h.
References clang::CodeGen::EHScope::CleanupBits.
Referenced by EHCleanupScope(), clang::CodeGen::EHScopeStack::getInnermostActiveEHScope(), clang::CodeGen::EHScopeStack::getInnermostActiveNormalCleanup(), and clang::CodeGen::CodeGenFunction::PopCleanupBlock().
| bool clang::CodeGen::EHCleanupScope::isEHCleanup | ( | ) | const [inline] |
Definition at line 280 of file CGCleanup.h.
References clang::CodeGen::EHScope::CleanupBits.
Referenced by clang::CodeGen::CodeGenFunction::initFullExprCleanup(), clang::CodeGen::CodeGenFunction::PopCleanupBlock(), and SetupCleanupBlockActivation().
| bool clang::CodeGen::EHCleanupScope::isNormalCleanup | ( | ) | const [inline] |
Definition at line 276 of file CGCleanup.h.
References clang::CodeGen::EHScope::CleanupBits.
Referenced by CreateNormalEntry(), clang::CodeGen::CodeGenFunction::EmitBranchThroughCleanup(), clang::CodeGen::CodeGenFunction::initFullExprCleanup(), clang::CodeGen::CodeGenFunction::PopCleanupBlock(), and SetupCleanupBlockActivation().
| void clang::CodeGen::EHCleanupScope::setActive | ( | bool | A | ) | [inline] |
Definition at line 285 of file CGCleanup.h.
References clang::CodeGen::EHScope::CleanupBits.
| void clang::CodeGen::EHCleanupScope::setActiveFlag | ( | llvm::AllocaInst * | Var | ) | [inline] |
Definition at line 288 of file CGCleanup.h.
Referenced by clang::CodeGen::CodeGenFunction::initFullExprCleanup(), and SetupCleanupBlockActivation().
| void clang::CodeGen::EHCleanupScope::setEHBlock | ( | llvm::BasicBlock * | BB | ) | [inline] |
Definition at line 282 of file CGCleanup.h.
References clang::CodeGen::EHScope::setCachedEHDispatchBlock().
| void clang::CodeGen::EHCleanupScope::setNormalBlock | ( | llvm::BasicBlock * | BB | ) | [inline] |
Definition at line 278 of file CGCleanup.h.
Referenced by CreateNormalEntry().
| void clang::CodeGen::EHCleanupScope::setTestFlagInEHCleanup | ( | ) | [inline] |
Definition at line 297 of file CGCleanup.h.
References clang::CodeGen::EHScope::CleanupBits.
Referenced by clang::CodeGen::CodeGenFunction::initFullExprCleanup(), and SetupCleanupBlockActivation().
| void clang::CodeGen::EHCleanupScope::setTestFlagInNormalCleanup | ( | ) | [inline] |
Definition at line 290 of file CGCleanup.h.
References clang::CodeGen::EHScope::CleanupBits.
Referenced by clang::CodeGen::CodeGenFunction::initFullExprCleanup(), and SetupCleanupBlockActivation().
| bool clang::CodeGen::EHCleanupScope::shouldTestFlagInEHCleanup | ( | ) | const [inline] |
Definition at line 300 of file CGCleanup.h.
References clang::CodeGen::EHScope::CleanupBits.
Referenced by clang::CodeGen::CodeGenFunction::PopCleanupBlock().
| bool clang::CodeGen::EHCleanupScope::shouldTestFlagInNormalCleanup | ( | ) | const [inline] |
Definition at line 293 of file CGCleanup.h.
References clang::CodeGen::EHScope::CleanupBits.
Referenced by clang::CodeGen::CodeGenFunction::PopCleanupBlock().