61 forceEmitPersonality(
false), shouldEmitLSDA(
false),
62 shouldEmitMoves(
false) {}
94 shouldEmitMoves = shouldEmitPersonality = shouldEmitLSDA =
false;
112 forceEmitPersonality =
120 shouldEmitPersonality =
121 (forceEmitPersonality ||
126 shouldEmitLSDA = shouldEmitPersonality &&
130 (shouldEmitPersonality || shouldEmitMoves);
148 if (!shouldEmitPersonality)
153 assert(
P &&
"Expected personality function");
157 if (forceEmitPersonality)
173 if (!shouldEmitPersonality)
const MachineFunction * getParent() const
Return the MachineFunction containing this basic block.
const MCAsmInfo * getAsmInfo() const
std::unique_ptr< MCStreamer > OutStreamer
This is the MCStreamer object for the file we are generating.
MCSymbol * getSymbol(const GlobalValue *GV) const
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
const DataLayout & getDataLayout() const
Return information about data layout.
void endFragment() override
const MachineFunction * MF
The current machine function.
void beginFragment(const MachineBasicBlock *MBB, ExceptionSymbolProvider ESP) override
const std::vector< LandingPadInfo > & getLandingPads() const
Return a reference to the landing pad info for the current function.
bool shouldEmitCFI
Per-function flag to indicate if frame CFI info should be emitted.
virtual void emitPersonalityValue(MCStreamer &Streamer, const DataLayout &TM, const MCSymbol *Sym) const
const Function * getFunction() const
getFunction - Return the LLVM function that this machine code represents
DwarfCFIException(AsmPrinter *A)
MachineModuleInfo * MMI
Collected machine module information.
Emits exception handling directives.
DwarfCFIExceptionBase(AsmPrinter *A)
void endFunction(const MachineFunction *) override
Gather and emit post-function exception information.
Constant * getPersonalityFn() const
Get the personality function associated with this function.
~DwarfCFIException() override
void emitExceptionTable()
Emit landing pads and actions.
bool needsOnlyDebugCFIMoves() const
Returns false if needsCFIMoves() == CFI_M_EH for any function in the module.
Function Alias Analysis false
void beginFunction(const MachineFunction *MF) override
Gather pre-function exception information.
Constant * stripPointerCasts()
const MCAsmInfo * MAI
Target Asm Printer information.
void addPersonality(const Function *Personality)
Provide the personality function for the exception information.
TargetMachine & TM
Target machine description.
bool hasPersonalityFn() const
Check whether this function has a personality function.
This class is intended to be used as a driving class for all asm writers.
EHPersonality classifyEHPersonality(const Value *Pers)
See if the given exception handling personality function is one that we understand.
const std::vector< const Function * > & getPersonalities() const
Return array of personality functions ever seen.
void markFunctionEnd() override
AsmPrinter * Asm
Target of directive emission.
bool hasEmittedCFISections
Per-module flag to indicate if .cfi_section has beeen emitted.
unsigned getLSDAEncoding() const
const MCContext & getContext() const
static MCSymbol * getExceptionSym(AsmPrinter *Asm)
Module.h This file contains the declarations for the Module class.
bool needsUnwindTableEntry() const
True if this function needs an unwind table.
unsigned getPersonalityEncoding() const
MCSymbol * ExceptionSymbolProvider(AsmPrinter *Asm)
MCSymbol * getCurExceptionSym()
void endModule() override
Emit all exception information that should come after the content.
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
CFIMoveType needsCFIMoves()
virtual MCSymbol * getCFIPersonalitySymbol(const GlobalValue *GV, const TargetMachine &TM, MachineModuleInfo *MMI) const
const TargetLoweringObjectFile & getObjFileLowering() const
Return information about object file lowering.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool usesCFIForEH() const
Returns true if the exception handling method for the platform uses call frame information to unwind...
MachineModuleInfo & getMMI() const
static GCRegistry::Add< ErlangGC > A("erlang","erlang-compatible garbage collector")
bool isNoOpWithoutInvoke(EHPersonality Pers)
Return true if this personality may be safely removed if there are no invoke instructions remaining i...
void tidyLandingPads(DenseMap< MCSymbol *, uintptr_t > *LPMap=nullptr)
Remap landing pad labels and remove any deleted landing pads.