clang
3.7.0
|
Go to the source code of this file.
Enumerations | |
enum | ForActivation_t { ForActivation, ForDeactivation } |
enum ForActivation_t |
Enumerator | |
---|---|
ForActivation | |
ForDeactivation |
Definition at line 1056 of file CGCleanup.cpp.
|
static |
Definition at line 431 of file CGCleanup.cpp.
References clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::EHCleanupScope::getNormalBlock(), clang::CodeGen::EHCleanupScope::isNormalCleanup(), and clang::CodeGen::EHCleanupScope::setNormalBlock().
Referenced by clang::CodeGen::CodeGenFunction::EmitBranchThroughCleanup(), and clang::CodeGen::CodeGenFunction::PopCleanupBlock().
|
static |
We don't need a normal entry block for the given cleanup. Optimistic fixup branches can cause these blocks to come into existence anyway; if so, destroy it.
The validity of this transformation is very much specific to the exact ways in which we form branches to cleanup entries.
Definition at line 543 of file CGCleanup.cpp.
References clang::Create(), clang::CodeGen::EHCleanupScope::getNormalBlock(), clang::CodeGen::CodeGenFunction::getUnreachableBlock(), and clang::CodeGen::CodeGenFunction::NormalCleanupDest.
Referenced by clang::CodeGen::CodeGenFunction::PopCleanupBlock().
|
static |
Definition at line 481 of file CGCleanup.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CodeGenFunction::EHStack, clang::CodeGen::EHScopeStack::Cleanup::Emit(), clang::CodeGen::CodeGenFunction::EmitBlock(), clang::TargetInfo::getCXXABI(), clang::CodeGen::CodeGenFunction::getTarget(), clang::CodeGen::CodeGenFunction::HaveInsertPoint(), clang::CodeGen::EHScopeStack::Cleanup::Flags::isForEHCleanup(), clang::TargetCXXABI::isMicrosoft(), clang::CodeGen::EHScopeStack::popTerminate(), and clang::CodeGen::EHScopeStack::pushTerminate().
Referenced by clang::CodeGen::CodeGenFunction::PopCleanupBlock().
|
static |
Definition at line 519 of file CGCleanup.cpp.
Referenced by clang::CodeGen::CodeGenFunction::PopCleanupBlock().
|
static |
Definition at line 1035 of file CGCleanup.cpp.
References clang::CodeGen::EHScopeStack::find(), clang::CodeGen::EHScopeStack::getInnermostEHScope(), clang::CodeGen::EHScope::hasEHBranches(), and clang::CodeGen::EHScopeStack::stable_iterator::strictlyEncloses().
Referenced by SetupCleanupBlockActivation().
|
static |
Definition at line 1016 of file CGCleanup.cpp.
References AttributeLangSupport::C, clang::CodeGen::EHScopeStack::find(), clang::CodeGen::EHScopeStack::getInnermostNormalCleanup(), S, and clang::CodeGen::EHScopeStack::stable_iterator::strictlyEncloses().
Referenced by SetupCleanupBlockActivation().
|
static |
All the branch fixups on the EH stack have propagated out past the outermost normal cleanup; resolve them all by adding cases to the given switch instruction.
Definition at line 291 of file CGCleanup.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::EHScopeStack::clearFixups(), clang::CodeGen::BranchFixup::Destination, clang::CodeGen::BranchFixup::DestinationIndex, clang::CodeGen::CodeGenFunction::EHStack, clang::CodeGen::EHScopeStack::getBranchFixup(), clang::CodeGen::CodeGenFunction::getNormalCleanupDestSlot(), clang::CodeGen::EHScopeStack::getNumBranchFixups(), clang::CodeGen::BranchFixup::InitialBranch, and clang::CodeGen::BranchFixup::OptimisticBranchBlock.
Referenced by clang::CodeGen::CodeGenFunction::PopCleanupBlock().
|
static |
The given cleanup block is changing activation state. Configure a cleanup variable if necessary.
It would be good if we had some way of determining if there were extra uses after the change-over point.
Definition at line 1066 of file CGCleanup.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CreateTempAlloca(), clang::CodeGen::CodeGenFunction::EHStack, clang::CodeGen::EHScopeStack::find(), ForActivation, ForDeactivation, clang::CodeGen::EHCleanupScope::getActiveFlag(), clang::CodeGen::EHCleanupScope::isEHCleanup(), clang::CodeGen::CodeGenFunction::isInConditionalBranch(), clang::CodeGen::EHCleanupScope::isNormalCleanup(), IsUsedAsEHCleanup(), IsUsedAsNormalCleanup(), clang::CodeGen::EHCleanupScope::setActiveFlag(), clang::CodeGen::CodeGenFunction::setBeforeOutermostConditional(), clang::CodeGen::EHCleanupScope::setTestFlagInEHCleanup(), and clang::CodeGen::EHCleanupScope::setTestFlagInNormalCleanup().
Referenced by clang::CodeGen::CodeGenFunction::ActivateCleanupBlock(), and clang::CodeGen::CodeGenFunction::DeactivateCleanupBlock().
|
static |
Attempts to reduce a cleanup's entry block to a fallthrough. This is basically llvm::MergeBlockIntoPredecessor, except simplified/optimized for the tighter constraints on cleanup blocks.
Returns the new block, whatever it is.
Definition at line 447 of file CGCleanup.cpp.
References clang::CodeGen::CodeGenFunction::Builder.
Referenced by clang::CodeGen::CodeGenFunction::PopCleanupBlock().
|
static |
Transitions the terminator of the given exit-block of a cleanup to be a cleanup switch.
Definition at line 329 of file CGCleanup.cpp.
References clang::Create(), and clang::CodeGen::CodeGenFunction::getNormalCleanupDestSlot().
Referenced by clang::CodeGen::CodeGenFunction::ResolveBranchFixups().