clang 20.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 "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.
 
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.
 
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.
 

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

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

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

◆ 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

Definition at line 269 of file CGException.cpp.

References getPersonalityFn().

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

References clang::CodeGen::EHScope::Catch, clang::CodeGen::EHScope::Cleanup, clang::CodeGen::EHScope::Filter, and clang::CodeGen::EHScope::Terminate.

◆ LandingPadHasOnlyCXXUses()

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

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

Definition at line 276 of file CGException.cpp.

References E.

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

References E, LandingPadHasOnlyCXXUses(), and PersonalityHasOnlyCXXUses().

Referenced by PersonalityHasOnlyCXXUses().