clang  3.7.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)
 
static const EHPersonality & getCPersonality (const llvm::Triple &T, const LangOptions &L)
 
static const EHPersonality & getObjCPersonality (const llvm::Triple &T, const LangOptions &L)
 
static const EHPersonality & getCXXPersonality (const llvm::Triple &T, const LangOptions &L)
 
static const EHPersonality & getObjCXXPersonality (const llvm::Triple &T, const LangOptions &L)
 
static const EHPersonality & getSEHPersonalityMSVC (const llvm::Triple &T)
 
static llvm::Constant * getPersonalityFn (CodeGenModule &CGM, const EHPersonality &Personality)
 
static llvm::Constant * getOpaquePersonalityFn (CodeGenModule &CGM, const EHPersonality &Personality)
 
static bool PersonalityHasOnlyCXXUses (llvm::Constant *Fn)
 
static llvm::Constant * getCatchAllValue (CodeGenFunction &CGF)
 
static void emitFilterDispatchBlock (CodeGenFunction &CGF, EHFilterScope &filterScope)
 Emit the dispatch block for a filter scope if necessary. More...
 
static bool isNonEHScope (const EHScope &S)
 
static void emitCatchDispatchBlock (CodeGenFunction &CGF, EHCatchScope &catchScope)
 

Function Documentation

static void emitCatchDispatchBlock ( 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 350 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

Definition at line 148 of file CGException.cpp.

References useLibGCCSEHPersonality().

Referenced by getObjCPersonality().

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

Definition at line 176 of file CGException.cpp.

References useLibGCCSEHPersonality().

Referenced by getObjCXXPersonality().

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

Definition at line 213 of file CGException.cpp.

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

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

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

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

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

Definition at line 262 of file CGException.cpp.

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

Referenced by getCPersonality(), and getCXXPersonality().