clang  3.9.0
Functions
CGException.cpp File Reference
#include "CodeGenFunction.h"
#include "CGCXXABI.h"
#include "CGCleanup.h"
#include "CGObjCRuntime.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 bool useLibGCCSEHPersonality (const llvm::Triple &T)
 On Win64, use libgcc's SEH personality function. More...
 
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

static void emitCatchDispatchBlock ( CodeGenFunction CGF,
EHCatchScope catchScope 
)
static
static void emitCatchPadBlock ( CodeGenFunction CGF,
EHCatchScope CatchScope 
)
static
static void emitFilterDispatchBlock ( CodeGenFunction CGF,
EHFilterScope filterScope 
)
static
static llvm::Constant* getCatchallRethrowFn ( CodeGenModule CGM,
StringRef  Name 
)
static
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 336 of file CGException.cpp.

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

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

static const EHPersonality& getCPersonality ( const llvm::Triple &  T,
const LangOptions L 
)
static
static const EHPersonality& getCXXPersonality ( const llvm::Triple &  T,
const LangOptions L 
)
static
static llvm::Constant* getFreeExceptionFn ( CodeGenModule CGM)
static
static const EHPersonality& getObjCPersonality ( const llvm::Triple &  T,
const LangOptions L 
)
static
static const EHPersonality& getObjCXXPersonality ( const llvm::Triple &  T,
const LangOptions L 
)
static
static llvm::Constant* getOpaquePersonalityFn ( CodeGenModule CGM,
const EHPersonality Personality 
)
static
static llvm::Constant* getPersonalityFn ( CodeGenModule CGM,
const EHPersonality Personality 
)
static
static const EHPersonality& getSEHPersonalityMSVC ( const llvm::Triple &  T)
static
static llvm::Constant* getUnexpectedFn ( CodeGenModule CGM)
static
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 671 of file CGException.cpp.

References clang::CodeGen::EHScope::Catch, clang::CodeGen::EHScope::Cleanup, clang::CodeGen::EHScope::Filter, clang::CodeGen::EHScope::getKind(), clang::CodeGen::isEHCleanup(), clang::CodeGen::EHScope::PadEnd, S, and clang::CodeGen::EHScope::Terminate.

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

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

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

Definition at line 237 of file CGException.cpp.

References E, and I.

Referenced by 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 268 of file CGException.cpp.

References E, and LandingPadHasOnlyCXXUses().

static bool useLibGCCSEHPersonality ( const llvm::Triple &  T)
static

On Win64, use libgcc's SEH personality function.

We fall back to dwarf on other platforms, unless the user asked for SjLj exceptions.

Definition at line 112 of file CGException.cpp.

Referenced by getCPersonality(), and getCXXPersonality().