clang  19.0.0git
Functions
CGException.cpp File Reference
#include "CGCXXABI.h"
#include "CGCleanup.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 "clang/Basic/TargetBuiltins.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.

Functions

static llvm::FunctionCallee getFreeExceptionFn (CodeGenModule &CGM)
 
static llvm::FunctionCallee getSehTryBeginFn (CodeGenModule &CGM)
 
static llvm::FunctionCallee getSehTryEndFn (CodeGenModule &CGM)
 
static llvm::FunctionCallee getUnexpectedFn (CodeGenModule &CGM)
 
static llvm::FunctionCallee getCatchallRethrowFn (CodeGenModule &CGM, StringRef Name)
 
static const EHPersonalitygetCPersonality (const TargetInfo &Target, const LangOptions &L)
 
static const EHPersonalitygetObjCPersonality (const TargetInfo &Target, const LangOptions &L)
 
static const EHPersonalitygetCXXPersonality (const TargetInfo &Target, const LangOptions &L)
 
static const EHPersonalitygetObjCXXPersonality (const TargetInfo &Target, const LangOptions &L)
 Determines the personality function to use when both C++ and Objective-C exceptions are being caught. More...
 
static const EHPersonalitygetSEHPersonalityMSVC (const llvm::Triple &T)
 
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. More...
 
static bool PersonalityHasOnlyCXXUses (llvm::Constant *Fn)
 Check whether a personality function could reasonably be swapped for a C++ personality function. More...
 
static llvm::Constant * getCatchAllValue (CodeGenFunction &CGF)
 Returns the value to inject into a selector to indicate the presence of a catch-all. More...
 
static void emitFilterDispatchBlock (CodeGenFunction &CGF, EHFilterScope &filterScope)
 Emit the dispatch block for a filter scope if necessary. More...
 
static bool isNonEHScope (const EHScope &S)
 Check whether this is a non-EH scope, i.e. More...
 
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. More...
 

Function Documentation

◆ emitCatchDispatchBlock()

static void emitCatchDispatchBlock ( CodeGenFunction CGF,
EHCatchScope catchScope 
)
static

◆ emitCatchPadBlock()

static void emitCatchPadBlock ( CodeGenFunction CGF,
EHCatchScope CatchScope 
)
static

◆ emitFilterDispatchBlock()

static void emitFilterDispatchBlock ( CodeGenFunction CGF,
EHFilterScope filterScope 
)
static

◆ emitWasmCatchPadBlock()

static void emitWasmCatchPadBlock ( CodeGenFunction CGF,
EHCatchScope CatchScope 
)
static

◆ getCatchallRethrowFn()

static llvm::FunctionCallee getCatchallRethrowFn ( CodeGenModule CGM,
StringRef  Name 
)
static

Definition at line 89 of file CGException.cpp.

Referenced by clang::CodeGen::CodeGenFunction::getEHResumeBlock().

◆ getCatchAllValue()

static llvm::Constant* getCatchAllValue ( CodeGenFunction CGF)
static

Returns the value to inject into a selector to indicate the presence of a catch-all.

Definition at line 376 of file CGException.cpp.

References clang::CodeGen::CodeGenTypeCache::Int8PtrTy.

Referenced by clang::CodeGen::CodeGenFunction::EmitLandingPad(), and clang::CodeGen::CodeGenFunction::getTerminateLandingPad().

◆ getCPersonality()

static const EHPersonality& getCPersonality ( const TargetInfo Target,
const LangOptions L 
)
static

◆ getCXXPersonality()

static const EHPersonality& getCXXPersonality ( const TargetInfo Target,
const LangOptions L 
)
static

◆ getFreeExceptionFn()

static llvm::FunctionCallee getFreeExceptionFn ( CodeGenModule CGM)
static

◆ getObjCPersonality()

static const EHPersonality& getObjCPersonality ( const TargetInfo Target,
const LangOptions L 
)
static

◆ getObjCXXPersonality()

static const EHPersonality& getObjCXXPersonality ( const TargetInfo Target,
const LangOptions L 
)
static

◆ getOpaquePersonalityFn()

static llvm::Constant* getOpaquePersonalityFn ( CodeGenModule CGM,
const EHPersonality Personality 
)
static

◆ getPersonalityFn()

static llvm::FunctionCallee getPersonalityFn ( CodeGenModule CGM,
const EHPersonality Personality 
)
static

◆ getSEHPersonalityMSVC()

static const EHPersonality& getSEHPersonalityMSVC ( const llvm::Triple &  T)
static

◆ getSehTryBeginFn()

static llvm::FunctionCallee getSehTryBeginFn ( CodeGenModule CGM)
static

◆ getSehTryEndFn()

static llvm::FunctionCallee getSehTryEndFn ( CodeGenModule CGM)
static

◆ getUnexpectedFn()

static llvm::FunctionCallee getUnexpectedFn ( CodeGenModule CGM)
static

◆ isNonEHScope()

static bool isNonEHScope ( const EHScope S)
static

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 762 of file CGException.cpp.

Referenced by clang::CodeGen::CodeGenFunction::getInvokeDestImpl().

◆ LandingPadHasOnlyCXXUses()

static bool LandingPadHasOnlyCXXUses ( llvm::LandingPadInst *  LPI)
static

Check whether a landingpad instruction only uses C++ features.

Definition at line 277 of file CGException.cpp.

Referenced by PersonalityHasOnlyCXXUses().

◆ PersonalityHasOnlyCXXUses()

static bool PersonalityHasOnlyCXXUses ( llvm::Constant *  Fn)
static

Check whether a personality function could reasonably be swapped for a C++ personality function.

Definition at line 308 of file CGException.cpp.

References LandingPadHasOnlyCXXUses().