|
clang 24.0.0git
|
#include "CGCXXABI.h"#include "CGCleanup.h"#include "CGDebugInfo.h"#include "CGObjCRuntime.h"#include "CodeGenFunction.h"#include "ConstantEmitter.h"#include "TargetInfo.h"#include "clang/AST/Mangle.h"#include "clang/AST/StmtCXX.h"#include "clang/AST/StmtObjC.h"#include "clang/AST/StmtVisitor.h"#include "clang/Basic/DiagnosticSema.h"#include "llvm/IR/IntrinsicInst.h"#include "llvm/IR/Intrinsics.h"#include "llvm/IR/IntrinsicsWebAssembly.h"#include "llvm/Support/SaveAndRestore.h"Go to the source code of this file.
Namespaces | |
| namespace | clang |
| Top level wrappers for InstallAPI frontend operations. | |
| namespace | clang::CodeGen |
Functions | |
| static llvm::FunctionCallee | getFreeExceptionFn (CodeGenModule &CGM) |
| static llvm::FunctionCallee | getUnexpectedFn (CodeGenModule &CGM) |
| static llvm::FunctionCallee | getCatchallRethrowFn (CodeGenModule &CGM, StringRef Name) |
| const EHPersonality & | clang::CodeGen::getEHPersonality (CodeGenModule &CGM, const FunctionDecl *FD) |
Selects the personality function to use for FD, or for the translation unit as a whole when FD is null. | |
| const EHPersonality & | clang::CodeGen::getEHPersonality (CodeGenFunction &CGF) |
| Selects the personality function to use for the function currently being emitted. | |
| static llvm::FunctionCallee | getPersonalityFn (CodeGenModule &CGM, const EHPersonality &Personality) |
| static llvm::Constant * | getOpaquePersonalityFn (CodeGenModule &CGM, const EHPersonality &Personality) |
| static bool | LandingPadHasOnlyCXXUses (llvm::LandingPadInst *LPI) |
| Check whether a landingpad instruction only uses C++ features. | |
| static bool | PersonalityHasOnlyCXXUses (llvm::Constant *Fn) |
| Check whether a personality function could reasonably be swapped for a C++ personality function. | |
| static llvm::Constant * | getCatchAllValue (CodeGenFunction &CGF) |
| Returns the value to inject into a selector to indicate the presence of a catch-all. | |
| static void | emitFilterDispatchBlock (CodeGenFunction &CGF, EHFilterScope &filterScope) |
| Emit the dispatch block for a filter scope if necessary. | |
| static bool | isNonEHScope (const EHScope &S) |
| Check whether this is a non-EH scope, i.e. | |
| static void | emitCatchPadBlock (CodeGenFunction &CGF, EHCatchScope &CatchScope) |
| static void | emitWasmCatchPadBlock (CodeGenFunction &CGF, EHCatchScope &CatchScope) |
| static void | emitCatchDispatchBlock (CodeGenFunction &CGF, EHCatchScope &catchScope) |
| Emit the structure of the dispatch block for the given catch scope. | |
|
static |
Emit the structure of the dispatch block for the given catch scope.
It is an invariant that the dispatch block already exists.
Definition at line 983 of file CGException.cpp.
References clang::CodeGen::EHCatchScope::Handler::Block, clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CodeGenFunction::EmitBlock(), clang::CodeGen::CodeGenFunction::EmitBlockAfterUses(), emitCatchPadBlock(), emitWasmCatchPadBlock(), clang::CodeGen::CatchTypeInfo::Flags, clang::CodeGen::EHScope::getCachedEHDispatchBlock(), clang::CodeGen::CodeGenFunction::getEHDispatchBlock(), clang::CodeGen::getEHPersonality(), clang::CodeGen::EHScope::getEnclosingEHScope(), clang::CodeGen::EHCatchScope::getHandler(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::CodeGen::EHCatchScope::getNumHandlers(), clang::CodeGen::CodeGenFunction::getSelectorFromSlot(), clang::CodeGen::EHCatchScope::Handler::isCatchAll(), clang::CodeGen::CodeGenFunction::performAddrSpaceCast(), clang::CodeGen::CatchTypeInfo::RTTI, clang::CodeGen::EHCatchScope::Handler::Type, and clang::CodeGen::CodeGenTypeCache::VoidPtrTy.
Referenced by clang::CodeGen::CodeGenFunction::ExitCXXTryStmt(), clang::CodeGen::CodeGenFunction::ExitSEHTryStmt(), and clang::CodeGen::CodeGenFunction::popCatchScope().
|
static |
Definition at line 831 of file CGException.cpp.
References clang::CodeGen::EHCatchScope::Handler::Block, clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CurrentFuncletPad, clang::CodeGen::CodeGenFunction::EmitBlockAfterUses(), clang::CodeGen::EHScope::getCachedEHDispatchBlock(), clang::CodeGen::CodeGenFunction::getEHDispatchBlock(), clang::CodeGen::getEHPersonality(), clang::CodeGen::EHScope::getEnclosingEHScope(), clang::CodeGen::EHCatchScope::getHandler(), clang::CodeGen::CodeGenFunction::getLLVMContext(), clang::CodeGen::EHCatchScope::getNumHandlers(), clang::CodeGen::EHCatchScope::Handler::Type, and clang::CodeGen::CodeGenTypeCache::VoidPtrTy.
Referenced by emitCatchDispatchBlock().
|
static |
Emit the dispatch block for a filter scope if necessary.
Definition at line 393 of file CGException.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CodeGenFunction::EmitBlock(), clang::CodeGen::CodeGenFunction::EmitBlockAfterUses(), clang::CodeGen::CodeGenFunction::EmitRuntimeCall(), clang::CodeGen::EHScope::getCachedEHDispatchBlock(), clang::CodeGen::CodeGenFunction::getEHResumeBlock(), clang::CodeGen::CodeGenFunction::getExceptionFromSlot(), clang::CodeGen::EHFilterScope::getNumFilters(), clang::CodeGen::CodeGenFunction::getSelectorFromSlot(), and getUnexpectedFn().
Referenced by clang::CodeGen::CodeGenFunction::EmitEndEHSpec().
|
static |
Definition at line 874 of file CGException.cpp.
References clang::CodeGen::EHCatchScope::Handler::Block, clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CodeGenFunction::CurrentFuncletPad, clang::CodeGen::CodeGenFunction::EmitBlock(), clang::CodeGen::CodeGenFunction::EmitBlockAfterUses(), clang::CodeGen::EHScope::getCachedEHDispatchBlock(), clang::CodeGen::CodeGenFunction::getEHDispatchBlock(), clang::CodeGen::EHScope::getEnclosingEHScope(), clang::CodeGen::CodeGenFunction::getExceptionSlot(), clang::CodeGen::EHCatchScope::getHandler(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::CodeGen::CodeGenFunction::getLLVMContext(), clang::CodeGen::EHCatchScope::getNumHandlers(), clang::CodeGen::EHCatchScope::Handler::isCatchAll(), clang::CodeGen::EHCatchScope::Handler::Type, and clang::CodeGen::CodeGenTypeCache::VoidPtrTy.
Referenced by emitCatchDispatchBlock().
|
static |
Definition at line 77 of file CGException.cpp.
References clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by clang::CodeGen::CodeGenFunction::getEHResumeBlock().
|
static |
Returns the value to inject into a selector to indicate the presence of a catch-all.
Definition at line 224 of file CGException.cpp.
References clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
Referenced by clang::CodeGen::CodeGenFunction::EmitLandingPad(), and clang::CodeGen::CodeGenFunction::getTerminateLandingPad().
|
static |
Definition at line 33 of file CGException.cpp.
References clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
|
static |
Definition at line 117 of file CGException.cpp.
References clang::cast(), and getPersonalityFn().
Referenced by clang::CodeGen::CodeGenFunction::getInvokeDestImpl(), and clang::CodeGen::CodeGenFunction::getTerminateLandingPad().
|
static |
|
static |
Definition at line 42 of file CGException.cpp.
References clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by emitFilterDispatchBlock().
Check whether this is a non-EH scope, i.e.
a scope which doesn't affect exception handling. Currently, the only non-EH scopes are normal-only cleanup scopes.
Definition at line 627 of file CGException.cpp.
References clang::cast(), clang::CodeGen::EHScope::Catch, clang::CodeGen::EHScope::Cleanup, clang::CodeGen::EHScope::Filter, clang::CodeGen::EHScope::getKind(), and clang::CodeGen::EHScope::Terminate.
Referenced by clang::CodeGen::CodeGenFunction::getInvokeDestImpl().
|
static |
Check whether a landingpad instruction only uses C++ features.
Definition at line 124 of file CGException.cpp.
References clang::cast().
Referenced by PersonalityHasOnlyCXXUses().
|
static |
Check whether a personality function could reasonably be swapped for a C++ personality function.
Definition at line 155 of file CGException.cpp.
References LandingPadHasOnlyCXXUses(), and PersonalityHasOnlyCXXUses().
Referenced by PersonalityHasOnlyCXXUses().