clang  6.0.0svn
Functions
CGException.cpp File Reference
#include "CodeGenFunction.h"
#include "CGCXXABI.h"
#include "CGCleanup.h"
#include "CGObjCRuntime.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/TargetBuiltins.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/Support/SaveAndRestore.h"
Include dependency graph for CGException.cpp:

Go to the source code of this file.

Functions

static llvm::Constant * getFreeExceptionFn (CodeGenModule &CGM)
 
static llvm::Constant * getUnexpectedFn (CodeGenModule &CGM)
 
static llvm::Constant * getCatchallRethrowFn (CodeGenModule &CGM, StringRef Name)
 
static const EHPersonalitygetCPersonality (const llvm::Triple &T, const LangOptions &L)
 
static const EHPersonalitygetObjCPersonality (const llvm::Triple &T, const LangOptions &L)
 
static const EHPersonalitygetCXXPersonality (const llvm::Triple &T, const LangOptions &L)
 
static const EHPersonalitygetObjCXXPersonality (const llvm::Triple &T, 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::Constant * 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 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

◆ getCatchallRethrowFn()

static llvm::Constant* getCatchallRethrowFn ( CodeGenModule CGM,
StringRef  Name 
)
static

Definition at line 77 of file CGException.cpp.

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

References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitNounwindRuntimeCall(), getFreeExceptionFn(), and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.

◆ getCPersonality()

static const EHPersonality& getCPersonality ( const llvm::Triple &  T,
const LangOptions L 
)
static

◆ getCXXPersonality()

static const EHPersonality& getCXXPersonality ( const llvm::Triple &  T,
const LangOptions L 
)
static

◆ getFreeExceptionFn()

static llvm::Constant* getFreeExceptionFn ( CodeGenModule CGM)
static

◆ getObjCPersonality()

static const EHPersonality& getObjCPersonality ( const llvm::Triple &  T,
const LangOptions L 
)
static

◆ getObjCXXPersonality()

static const EHPersonality& getObjCXXPersonality ( const llvm::Triple &  T,
const LangOptions L 
)
static

◆ getOpaquePersonalityFn()

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

◆ getPersonalityFn()

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

◆ getSEHPersonalityMSVC()

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

◆ getUnexpectedFn()

static llvm::Constant* 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 680 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 246 of file CGException.cpp.

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