LLVM API Documentation
#include <DwarfException.h>
Classes | |
struct | ActionEntry |
ActionEntry - Structure describing an entry in the actions table. More... | |
struct | CallSiteEntry |
CallSiteEntry - Structure describing an entry in the call-site table. More... | |
struct | PadRange |
PadRange - Structure holding a try-range and the associated landing pad. More... | |
Public Member Functions | |
DwarfException (AsmPrinter *A) | |
virtual | ~DwarfException () |
virtual void | EndModule () |
virtual void | BeginFunction (const MachineFunction *MF) |
virtual void | EndFunction () |
EndFunction - Gather and emit post-function exception information. More... | |
Protected Types | |
typedef DenseMap< MCSymbol *, PadRange > | RangeMapType |
Protected Member Functions | |
unsigned | ComputeActionsTable (const SmallVectorImpl< const LandingPadInfo * > &LPs, SmallVectorImpl< ActionEntry > &Actions, SmallVectorImpl< unsigned > &FirstActions) |
bool | CallToNoUnwindFunction (const MachineInstr *MI) |
void | ComputeCallSiteTable (SmallVectorImpl< CallSiteEntry > &CallSites, const RangeMapType &PadMap, const SmallVectorImpl< const LandingPadInfo * > &LPs, const SmallVectorImpl< unsigned > &FirstActions) |
void | EmitExceptionTable () |
virtual void | EmitTypeInfos (unsigned TTypeEncoding) |
Static Protected Member Functions | |
static unsigned | SharedTypeIds (const LandingPadInfo *L, const LandingPadInfo *R) |
SharedTypeIds - How many leading type ids two landing pads have in common. More... | |
static bool | PadLT (const LandingPadInfo *L, const LandingPadInfo *R) |
PadLT - Order landing pads lexicographically by type id. More... | |
Protected Attributes | |
AsmPrinter * | Asm |
Asm - Target of Dwarf emission. More... | |
MachineModuleInfo * | MMI |
MMI - Collected machine module information. More... | |
DwarfException - Emits Dwarf exception handling directives.
Definition at line 38 of file DwarfException.h.
|
protected |
Definition at line 61 of file DwarfException.h.
DwarfException::DwarfException | ( | AsmPrinter * | A | ) |
Definition at line 40 of file DwarfException.cpp.
|
virtual |
Definition at line 43 of file DwarfException.cpp.
|
virtual |
BeginFunction - Gather pre-function exception information. Assumes being emitted immediately after the function entry point.
BeginFunction - Gather pre-function exception information. Assumes it's being emitted immediately after the function entry point.
Reimplemented in llvm::Win64Exception, llvm::ARMException, and llvm::DwarfCFIException.
Definition at line 728 of file DwarfException.cpp.
References llvm_unreachable.
Referenced by llvm::AsmPrinter::EmitFunctionHeader().
|
protected |
CallToNoUnwindFunction - Return `true' if this is a call to a function marked `nounwind'. Return `false' otherwise.
Definition at line 186 of file DwarfException.cpp.
References llvm::Function::doesNotThrow(), llvm::dyn_cast(), F(), llvm::MachineOperand::getGlobal(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), I, llvm::MachineInstr::isCall(), and llvm::MachineOperand::isGlobal().
Referenced by ComputeCallSiteTable().
|
protected |
ComputeActionsTable - Compute the actions table and gather the first action index for each landing pad site.
Definition at line 76 of file DwarfException.cpp.
References llvm::SmallVectorTemplateCommon< T >::begin(), llvm::SmallVectorTemplateCommon< T >::end(), llvm::MachineModuleInfo::getFilterIds(), llvm::MCAsmInfo::getSLEB128Size(), llvm::MCAsmInfo::getULEB128Size(), I, MMI, llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::SmallVectorImpl< T >::reserve(), SharedTypeIds(), llvm::SmallVectorTemplateCommon< T >::size(), and llvm::LandingPadInfo::TypeIds.
Referenced by EmitExceptionTable().
|
protected |
ComputeCallSiteTable - Compute the call-site table. The entry for an invoke has a try-range containing the call, a non-zero landing pad and an appropriate action. The entry for an ordinary call has a try-range containing the call and zero for the landing pad and the action. Calls marked 'nounwind' have no entry and must not be contained in the try-range of any entry - they form gaps in the table. Entries must be ordered by try-range address.
ComputeCallSiteTable - Compute the call-site table. The entry for an invoke has a try-range containing the call, a non-zero landing pad, and an appropriate action. The entry for an ordinary call has a try-range containing the call and zero for the landing pad and the action. Calls marked 'nounwind' have no entry and must not be contained in the try-range of any entry - they form gaps in the table. Entries must be ordered by try-range address.
Definition at line 226 of file DwarfException.cpp.
References llvm::DwarfException::CallSiteEntry::Action, Asm, llvm::SmallVectorTemplateCommon< T >::back(), llvm::MachineFunction::begin(), llvm::LandingPadInfo::BeginLabels, CallToNoUnwindFunction(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::end(), llvm::MachineFunction::end(), llvm::DwarfException::CallSiteEntry::EndLabel, llvm::LandingPadInfo::EndLabels, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::find(), llvm::MachineModuleInfo::getCallSiteBeginLabel(), I, llvm::MCAsmInfo::isExceptionHandlingDwarf(), llvm::LandingPadInfo::LandingPadLabel, llvm::AsmPrinter::MAI, llvm::AsmPrinter::MF, llvm::A64CC::MI, MMI, P, llvm::DwarfException::PadRange::PadIndex, llvm::DwarfException::CallSiteEntry::PadLabel, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::DwarfException::PadRange::RangeIndex, llvm::SmallVectorImpl< T >::resize(), and llvm::SmallVectorTemplateCommon< T >::size().
Referenced by EmitExceptionTable().
|
protected |
EmitExceptionTable - Emit landing pads and actions.
The general organization of the table is complex, but the basic concepts are easy. First there is a header which describes the location and organization of the three components that follow.
EmitExceptionTable - Emit landing pads and actions.
The general organization of the table is complex, but the basic concepts are easy. First there is a header which describes the location and organization of the three components that follow.
Definition at line 347 of file DwarfException.cpp.
References llvm::DwarfException::CallSiteEntry::Action, llvm::MCStreamer::AddComment(), Asm, llvm::SmallVectorTemplateCommon< T >::begin(), llvm::DwarfException::CallSiteEntry::BeginLabel, llvm::LandingPadInfo::BeginLabels, ComputeActionsTable(), ComputeCallSiteTable(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::count(), llvm::dwarf::DW_EH_PE_omit, llvm::dwarf::DW_EH_PE_udata4, llvm::AsmPrinter::EmitAlignment(), llvm::AsmPrinter::EmitEncodingByte(), llvm::MCStreamer::EmitIntValue(), llvm::MCStreamer::EmitLabel(), llvm::AsmPrinter::EmitLabelDifference(), llvm::AsmPrinter::EmitSLEB128(), EmitTypeInfos(), llvm::AsmPrinter::EmitULEB128(), llvm::SmallVectorTemplateCommon< T >::end(), llvm::DwarfException::CallSiteEntry::EndLabel, llvm::AsmPrinter::getDataLayout(), llvm::MCAsmInfo::getExceptionHandlingType(), llvm::MachineModuleInfo::getFilterIds(), llvm::AsmPrinter::getFunctionNumber(), llvm::MachineModuleInfo::getLandingPads(), llvm::MCObjectFileInfo::getLSDASection(), llvm::MCSymbol::getName(), llvm::AsmPrinter::getObjFileLowering(), llvm::MCContext::GetOrCreateSymbol(), llvm::DataLayout::getPointerSize(), llvm::AsmPrinter::GetSizeOfEncodedValue(), llvm::AsmPrinter::GetTempSymbol(), llvm::MCObjectFileInfo::getTTypeEncoding(), llvm::MachineModuleInfo::getTypeInfos(), llvm::MCAsmInfo::getULEB128Size(), I, llvm::MCAsmInfo::isExceptionHandlingDwarf(), llvm::MCStreamer::isVerboseAsm(), llvm::AsmPrinter::MAI, MMI, N, llvm::DwarfException::ActionEntry::NextAction, llvm::AsmPrinter::OutContext, llvm::AsmPrinter::OutStreamer, P, llvm::DwarfException::CallSiteEntry::PadLabel, PadLT(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::SmallVectorImpl< T >::reserve(), llvm::SmallVectorTemplateCommon< T >::size(), llvm::ExceptionHandling::SjLj, llvm::MCStreamer::SwitchSection(), and llvm::DwarfException::ActionEntry::ValueForTypeID.
Referenced by llvm::DwarfCFIException::EndFunction(), llvm::ARMException::EndFunction(), and llvm::Win64Exception::EndFunction().
|
protectedvirtual |
Definition at line 679 of file DwarfException.cpp.
References llvm::MCStreamer::AddBlankLine(), llvm::MCStreamer::AddComment(), Asm, llvm::AsmPrinter::EmitTTypeReference(), llvm::AsmPrinter::EmitULEB128(), llvm::MachineModuleInfo::getFilterIds(), llvm::MachineModuleInfo::getTypeInfos(), I, llvm::MCStreamer::isVerboseAsm(), MMI, and llvm::AsmPrinter::OutStreamer.
Referenced by EmitExceptionTable().
|
virtual |
EndFunction - Gather and emit post-function exception information.
EndFunction - Gather and emit post-function exception information.
Reimplemented in llvm::Win64Exception, llvm::ARMException, and llvm::DwarfCFIException.
Definition at line 734 of file DwarfException.cpp.
References llvm_unreachable.
Referenced by llvm::AsmPrinter::EmitFunctionBody().
|
virtual |
EndModule - Emit all exception information that should come after the content.
Reimplemented in llvm::Win64Exception, llvm::ARMException, and llvm::DwarfCFIException.
Definition at line 722 of file DwarfException.cpp.
References llvm_unreachable.
Referenced by llvm::AsmPrinter::doFinalization().
|
staticprotected |
PadLT - Order landing pads lexicographically by type id.
Definition at line 61 of file DwarfException.cpp.
References llvm::LandingPadInfo::TypeIds.
Referenced by EmitExceptionTable().
|
staticprotected |
SharedTypeIds - How many leading type ids two landing pads have in common.
Definition at line 46 of file DwarfException.cpp.
References llvm::LandingPadInfo::TypeIds.
Referenced by ComputeActionsTable().
|
protected |
Asm - Target of Dwarf emission.
Definition at line 41 of file DwarfException.h.
Referenced by llvm::DwarfCFIException::BeginFunction(), llvm::ARMException::BeginFunction(), llvm::Win64Exception::BeginFunction(), ComputeCallSiteTable(), EmitExceptionTable(), EmitTypeInfos(), llvm::DwarfCFIException::EndFunction(), llvm::ARMException::EndFunction(), llvm::Win64Exception::EndFunction(), and llvm::DwarfCFIException::EndModule().
|
protected |
MMI - Collected machine module information.
Definition at line 44 of file DwarfException.h.
Referenced by llvm::DwarfCFIException::BeginFunction(), llvm::Win64Exception::BeginFunction(), ComputeActionsTable(), ComputeCallSiteTable(), EmitExceptionTable(), EmitTypeInfos(), llvm::DwarfCFIException::EndFunction(), llvm::ARMException::EndFunction(), llvm::Win64Exception::EndFunction(), and llvm::DwarfCFIException::EndModule().