LLVM
8.0.1
|
#include "CodeGen/AsmPrinter/WinException.h"
Public Member Functions | |
WinException (AsmPrinter *A) | |
~WinException () override | |
void | endModule () override |
Emit all exception information that should come after the content. More... | |
void | beginFunction (const MachineFunction *MF) override |
Gather pre-function exception information. More... | |
void | endFunction (const MachineFunction *) override |
Gather and emit post-function exception information. More... | |
void | beginFunclet (const MachineBasicBlock &MBB, MCSymbol *Sym) override |
Emit target-specific EH funclet machinery. More... | |
void | endFunclet () override |
Public Member Functions inherited from llvm::EHStreamer | |
EHStreamer (AsmPrinter *A) | |
~EHStreamer () override | |
void | setSymbolSize (const MCSymbol *Sym, uint64_t Size) override |
For symbols that have a size designated (e.g. More... | |
void | beginInstruction (const MachineInstr *MI) override |
Process beginning of an instruction. More... | |
void | endInstruction () override |
Process end of an instruction. More... | |
Public Member Functions inherited from llvm::AsmPrinterHandler | |
virtual | ~AsmPrinterHandler () |
Pin vtable to this file. More... | |
virtual void | markFunctionEnd () |
virtual void | beginFragment (const MachineBasicBlock *MBB, ExceptionSymbolProvider ESP) |
virtual void | endFragment () |
Additional Inherited Members | |
Static Public Member Functions inherited from llvm::EHStreamer | |
static bool | callToNoUnwindFunction (const MachineInstr *MI) |
Return `true' if this is a call to a function marked `nounwind'. More... | |
Protected Types inherited from llvm::EHStreamer | |
using | RangeMapType = DenseMap< MCSymbol *, PadRange > |
Protected Member Functions inherited from llvm::EHStreamer | |
void | computeActionsTable (const SmallVectorImpl< const LandingPadInfo *> &LandingPads, SmallVectorImpl< ActionEntry > &Actions, SmallVectorImpl< unsigned > &FirstActions) |
Compute the actions table and gather the first action index for each landing pad site. More... | |
void | computePadMap (const SmallVectorImpl< const LandingPadInfo *> &LandingPads, RangeMapType &PadMap) |
virtual void | computeCallSiteTable (SmallVectorImpl< CallSiteEntry > &CallSites, const SmallVectorImpl< const LandingPadInfo *> &LandingPads, const SmallVectorImpl< unsigned > &FirstActions) |
Compute the call-site table. More... | |
MCSymbol * | emitExceptionTable () |
Emit landing pads and actions. More... | |
virtual void | emitTypeInfos (unsigned TTypeEncoding, MCSymbol *TTBaseLabel) |
Static Protected Member Functions inherited from llvm::EHStreamer | |
static unsigned | sharedTypeIDs (const LandingPadInfo *L, const LandingPadInfo *R) |
How many leading type ids two landing pads have in common. More... | |
static bool | isFilterEHSelector (int Selector) |
static bool | isCleanupEHSelector (int Selector) |
static bool | isCatchEHSelector (int Selector) |
Protected Attributes inherited from llvm::EHStreamer | |
AsmPrinter * | Asm |
Target of directive emission. More... | |
MachineModuleInfo * | MMI |
Collected machine module information. More... | |
Definition at line 28 of file WinException.h.
WinException::WinException | ( | AsmPrinter * | A | ) |
Definition at line 41 of file WinException.cpp.
References llvm::EHStreamer::Asm, llvm::AsmPrinter::getDataLayout(), llvm::DataLayout::getPointerSizeInBits(), llvm::TargetMachine::getTargetTriple(), llvm::Triple::isAArch64(), and llvm::AsmPrinter::TM.
|
override |
Definition at line 48 of file WinException.cpp.
|
overridevirtual |
Emit target-specific EH funclet machinery.
Reimplemented from llvm::AsmPrinterHandler.
Definition at line 183 of file WinException.cpp.
References llvm::EHStreamer::Asm, llvm::AsmPrinter::EmitAlignment(), F(), llvm::MachineBasicBlock::getAlignment(), llvm::MachineFunction::getAlignment(), llvm::TargetLoweringObjectFile::getCFIPersonalitySymbol(), llvm::MachineFunction::getFunction(), getMCSymbolForMBB(), llvm::AsmPrinter::getObjFileLowering(), llvm::Function::getPersonalityFn(), llvm::Function::hasPersonalityFn(), llvm::COFF::IMAGE_SYM_CLASS_STATIC, llvm::COFF::IMAGE_SYM_DTYPE_FUNCTION, llvm::MachineBasicBlock::isCleanupFuncletEntry(), llvm::max(), llvm::AsmPrinter::MF, llvm::EHStreamer::MMI, llvm::AsmPrinter::OutStreamer, llvm::COFF::SCT_COMPLEX_TYPE_SHIFT, llvm::Constant::stripPointerCasts(), and llvm::AsmPrinter::TM.
Referenced by beginFunction().
|
overridevirtual |
Gather pre-function exception information.
Assumes being emitted immediately after the function entry point.
Implements llvm::AsmPrinterHandler.
Definition at line 60 of file WinException.cpp.
References llvm::EHStreamer::Asm, beginFunclet(), llvm::classifyEHPersonality(), llvm::AsmPrinter::CurrentFnSym, llvm::GlobalValue::dropLLVMManglingEscape(), llvm::dwarf::DW_EH_PE_omit, llvm::dyn_cast(), F(), llvm::MachineFunction::front(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getLandingPads(), llvm::TargetLoweringObjectFile::getLSDAEncoding(), llvm::Value::getName(), llvm::AsmPrinter::getObjFileLowering(), llvm::TargetLoweringObjectFile::getPersonalityEncoding(), llvm::Function::getPersonalityFn(), llvm::MachineFunction::getWinEHFuncInfo(), llvm::MachineFunction::hasEHFunclets(), llvm::Function::hasPersonalityFn(), llvm::MachineFunction::hasWinCFI(), llvm::isNoOpWithoutInvoke(), llvm::AsmPrinter::MAI, llvm::MSVC_X86SEH, llvm::AsmPrinter::needsSEHMoves(), llvm::Function::needsUnwindTableEntry(), llvm::Constant::stripPointerCasts(), llvm::Unknown, and llvm::MCAsmInfo::usesWindowsCFI().
|
overridevirtual |
Reimplemented from llvm::AsmPrinterHandler.
Definition at line 234 of file WinException.cpp.
References llvm::EHStreamer::Asm, assert(), llvm::classifyEHPersonality(), llvm::MCConstantExpr::create(), llvm::MCSymbolRefExpr::create(), llvm::MCBinaryExpr::createAdd(), llvm::MCBinaryExpr::createSub(), llvm::GlobalValue::dropLLVMManglingEscape(), llvm::WinEHFuncInfo::EHRegNodeEndOffset, F(), llvm::ISD::FrameIndex, llvm::TargetFrameLowering::getFrameIndexReference(), llvm::TargetFrameLowering::getFrameIndexReferencePreferSP(), llvm::TargetSubtargetInfo::getFrameLowering(), llvm::MachineFunction::getFunction(), llvm::Value::getName(), llvm::MCContext::getOrCreateSymbol(), llvm::Function::getPersonalityFn(), llvm::TargetLoweringBase::getStackPointerRegisterToSaveRestore(), llvm::MachineFunction::getSubtarget(), llvm::AsmPrinter::getSymbol(), llvm::TargetSubtargetInfo::getTargetLowering(), llvm::MachineFunction::hasEHFunclets(), llvm::Function::hasPersonalityFn(), llvm::MachineBasicBlock::isCleanupFuncletEntry(), llvm::MachineBasicBlock::isEHFuncletEntry(), llvm::AsmPrinter::MAI, llvm::AsmPrinter::MF, llvm::MSVC_CXX, llvm::MSVC_Win64SEH, llvm::AsmPrinter::OutContext, llvm::AsmPrinter::OutStreamer, scan(), llvm::Constant::stripPointerCasts(), llvm::Unknown, llvm::MCAsmInfo::usesWindowsCFI(), llvm::MCSymbolRefExpr::VK_COFF_IMGREL32, and llvm::MCSymbolRefExpr::VK_None.
Referenced by endFunction().
|
overridevirtual |
Gather and emit post-function exception information.
endFunction - Gather and emit post-function exception information.
Implements llvm::AsmPrinterHandler.
Definition at line 115 of file WinException.cpp.
References llvm::EHStreamer::Asm, llvm::classifyEHPersonality(), llvm::CoreCLR, llvm::EHStreamer::emitExceptionTable(), endFunclet(), F(), llvm::MachineFunction::getFunction(), llvm::Function::getPersonalityFn(), llvm::MachineFunction::hasEHFunclets(), llvm::Function::hasPersonalityFn(), llvm::isFuncletEHPersonality(), llvm::MSVC_CXX, llvm::MSVC_Win64SEH, llvm::MSVC_X86SEH, llvm::AsmPrinter::OutStreamer, llvm::Constant::stripPointerCasts(), llvm::MachineFunction::tidyLandingPads(), and llvm::Unknown.
|
overridevirtual |
Emit all exception information that should come after the content.
endModule - Emit all exception information that should come after the content.
Implements llvm::AsmPrinterHandler.
Definition at line 52 of file WinException.cpp.
References llvm::EHStreamer::Asm, F(), llvm::MachineModuleInfo::getModule(), llvm::AsmPrinter::getSymbol(), llvm::EHStreamer::MMI, and llvm::AsmPrinter::OutStreamer.