56 forceEmitPersonality(
false), shouldEmitLSDA(
false),
57 shouldEmitMoves(
false) {}
89 shouldEmitMoves = shouldEmitPersonality = shouldEmitLSDA =
false;
107 forceEmitPersonality =
115 shouldEmitPersonality =
116 (forceEmitPersonality ||
121 shouldEmitLSDA = shouldEmitPersonality &&
125 (shouldEmitPersonality || shouldEmitMoves);
143 if (!shouldEmitPersonality)
148 assert(
P &&
"Expected personality function");
152 if (forceEmitPersonality)
168 if (!shouldEmitPersonality)
const MCAsmInfo * getAsmInfo() const
const TargetLoweringObjectFile & getObjFileLowering() const
Return information about object file lowering.
std::unique_ptr< MCStreamer > OutStreamer
This is the MCStreamer object for the file we are generating.
This class represents lattice values for constants.
virtual void emitPersonalityValue(MCStreamer &Streamer, const DataLayout &TM, const MCSymbol *Sym) const
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
bool needsOnlyDebugCFIMoves() const
Returns false if needsCFIMoves() == CFI_M_EH for any function in the module.
void endFragment() override
CFIMoveType needsCFIMoves() const
void beginFragment(const MachineBasicBlock *MBB, ExceptionSymbolProvider ESP) override
bool shouldEmitCFI
Per-function flag to indicate if frame CFI info should be emitted.
MachineFunction * MF
The current machine function.
MachineModuleInfo & getMMI() const
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.
~DwarfCFIException() override
unsigned getLSDAEncoding() const
void tidyLandingPads(DenseMap< MCSymbol *, uintptr_t > *LPMap=nullptr, bool TidyIfNoBeginLabels=true)
Remap landing pad labels and remove any deleted landing pads.
const MCContext & getContext() const
bool hasPersonalityFn() const
Check whether this function has a personality function.
void beginFunction(const MachineFunction *MF) override
Gather pre-function exception information.
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.
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.
void markFunctionEnd() override
const Constant * stripPointerCasts() const
AsmPrinter * Asm
Target of directive emission.
bool hasEmittedCFISections
Per-module flag to indicate if .cfi_section has beeen emitted.
const std::vector< LandingPadInfo > & getLandingPads() const
Return a reference to the landing pad info for the current function.
unsigned getPersonalityEncoding() const
MCSymbol * getSymbol(const GlobalValue *GV) const
static MCSymbol * getExceptionSym(AsmPrinter *Asm)
Module.h This file contains the declarations for the Module class.
MCSymbol * ExceptionSymbolProvider(AsmPrinter *Asm)
const Function & getFunction() const
Return the LLVM function that this machine code represents.
bool usesCFIForEH() const
Returns true if the exception handling method for the platform uses call frame information to unwind...
bool needsUnwindTableEntry() const
True if this function needs an unwind table.
This file contains constants used for implementing Dwarf debug support.
MCSymbol * getCurExceptionSym()
void endModule() override
Emit all exception information that should come after the content.
const MachineFunction * getParent() const
Return the MachineFunction containing this basic block.
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
MCSymbol * emitExceptionTable()
Emit landing pads and actions.
const std::vector< const Function * > & getPersonalities() const
Return array of personality functions ever seen.
Constant * getPersonalityFn() const
Get the personality function associated with this function.
const DataLayout & getDataLayout() const
Return information about data layout.
virtual MCSymbol * getCFIPersonalitySymbol(const GlobalValue *GV, const TargetMachine &TM, MachineModuleInfo *MMI) const
bool isNoOpWithoutInvoke(EHPersonality Pers)
Return true if this personality may be safely removed if there are no invoke instructions remaining i...