class EHStreamer
Declaration
class EHStreamer : public AsmPrinterHandler { /* full declaration omitted */ };
Description
Emits exception handling directives.
Declared at: llvm/lib/CodeGen/AsmPrinter/EHStreamer.h:30
Inherits from: AsmPrinterHandler
Member Variables
- protected llvm::AsmPrinter* Asm
- Target of directive emission.
- protected llvm::MachineModuleInfo* MMI
- Collected machine module information.
Method Overview
- public EHStreamer(llvm::AsmPrinter * A)
- public void beginInstruction(const llvm::MachineInstr * MI)
- public static bool callToNoUnwindFunction(const llvm::MachineInstr * MI)
- protected void computeActionsTable(const SmallVectorImpl<const llvm::LandingPadInfo *> & LandingPads, SmallVectorImpl<llvm::EHStreamer::ActionEntry> & Actions, SmallVectorImpl<unsigned int> & FirstActions)
- protected virtual void computeCallSiteTable(SmallVectorImpl<llvm::EHStreamer::CallSiteEntry> & CallSites, const SmallVectorImpl<const llvm::LandingPadInfo *> & LandingPads, const SmallVectorImpl<unsigned int> & FirstActions)
- protected void computePadMap(const SmallVectorImpl<const llvm::LandingPadInfo *> & LandingPads, llvm::EHStreamer::RangeMapType & PadMap)
- protected llvm::MCSymbol * emitExceptionTable()
- protected virtual void emitTypeInfos(unsigned int TTypeEncoding, llvm::MCSymbol * TTBaseLabel)
- public void endInstruction()
- protected static bool isCatchEHSelector(int Selector)
- protected static bool isCleanupEHSelector(int Selector)
- protected static bool isFilterEHSelector(int Selector)
- public void setSymbolSize(const llvm::MCSymbol * Sym, uint64_t Size)
- protected static unsigned int sharedTypeIDs(const llvm::LandingPadInfo * L, const llvm::LandingPadInfo * R)
- public ~EHStreamer()
Inherited from AsmPrinterHandler:
- public beginFragment
- public beginFunclet
- public beginFunction
- public beginInstruction
- public endFragment
- public endFunclet
- public endFunction
- public endInstruction
- public endModule
- public markFunctionEnd
- public setSymbolSize
Methods
¶EHStreamer(llvm::AsmPrinter* A)
EHStreamer(llvm::AsmPrinter* A)
Declared at: llvm/lib/CodeGen/AsmPrinter/EHStreamer.h:125
Parameters
¶void beginInstruction(
const llvm::MachineInstr* MI)
void beginInstruction(
const llvm::MachineInstr* MI)
Description
Process beginning of an instruction.
Declared at: llvm/lib/CodeGen/AsmPrinter/EHStreamer.h:130
Parameters
- const llvm::MachineInstr* MI
¶static bool callToNoUnwindFunction(
const llvm::MachineInstr* MI)
static bool callToNoUnwindFunction(
const llvm::MachineInstr* MI)
Description
Return `true' if this is a call to a function marked `nounwind'. Return `false' otherwise.
Declared at: llvm/lib/CodeGen/AsmPrinter/EHStreamer.h:135
Parameters
- const llvm::MachineInstr* MI
¶void computeActionsTable(
const SmallVectorImpl<
const llvm::LandingPadInfo*>& LandingPads,
SmallVectorImpl<
llvm::EHStreamer::ActionEntry>& Actions,
SmallVectorImpl<unsigned int>& FirstActions)
void computeActionsTable(
const SmallVectorImpl<
const llvm::LandingPadInfo*>& LandingPads,
SmallVectorImpl<
llvm::EHStreamer::ActionEntry>& Actions,
SmallVectorImpl<unsigned int>& FirstActions)
Description
Compute the actions table and gather the first action index for each landing pad site.
Declared at: llvm/lib/CodeGen/AsmPrinter/EHStreamer.h:74
Parameters
- const SmallVectorImpl< const llvm::LandingPadInfo*>& LandingPads
- SmallVectorImpl<llvm::EHStreamer::ActionEntry>& Actions
- SmallVectorImpl<unsigned int>& FirstActions
¶virtual void computeCallSiteTable(
SmallVectorImpl<
llvm::EHStreamer::CallSiteEntry>&
CallSites,
const SmallVectorImpl<
const llvm::LandingPadInfo*>& LandingPads,
const SmallVectorImpl<unsigned int>&
FirstActions)
virtual void computeCallSiteTable(
SmallVectorImpl<
llvm::EHStreamer::CallSiteEntry>&
CallSites,
const SmallVectorImpl<
const llvm::LandingPadInfo*>& LandingPads,
const SmallVectorImpl<unsigned int>&
FirstActions)
Description
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.
Declared at: llvm/lib/CodeGen/AsmPrinter/EHStreamer.h:87
Parameters
- SmallVectorImpl<llvm::EHStreamer::CallSiteEntry>& CallSites
- const SmallVectorImpl< const llvm::LandingPadInfo*>& LandingPads
- const SmallVectorImpl<unsigned int>& FirstActions
¶void computePadMap(
const SmallVectorImpl<
const llvm::LandingPadInfo*>& LandingPads,
llvm::EHStreamer::RangeMapType& PadMap)
void computePadMap(
const SmallVectorImpl<
const llvm::LandingPadInfo*>& LandingPads,
llvm::EHStreamer::RangeMapType& PadMap)
Declared at: llvm/lib/CodeGen/AsmPrinter/EHStreamer.h:78
Parameters
- const SmallVectorImpl< const llvm::LandingPadInfo*>& LandingPads
- llvm::EHStreamer::RangeMapType& PadMap
¶llvm::MCSymbol* emitExceptionTable()
llvm::MCSymbol* emitExceptionTable()
Description
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. 1. The landing pad site information describes the range of code covered by the try. In our case it's an accumulation of the ranges covered by the invokes in the try. There is also a reference to the landing pad that handles the exception once processed. Finally an index into the actions table. 2. The action table, in our case, is composed of pairs of type ids and next action offset. Starting with the action index from the landing pad site, each type Id is checked for a match to the current exception. If it matches then the exception and type id are passed on to the landing pad. Otherwise the next action is looked up. This chain is terminated with a next action of zero. If no type id is found the frame is unwound and handling continues. 3. Type id table contains references to all the C++ typeinfo for all catches in the function. This tables is reversed indexed base 1. Returns the starting symbol of an exception table.
Declared at: llvm/lib/CodeGen/AsmPrinter/EHStreamer.h:113
¶virtual void emitTypeInfos(
unsigned int TTypeEncoding,
llvm::MCSymbol* TTBaseLabel)
virtual void emitTypeInfos(
unsigned int TTypeEncoding,
llvm::MCSymbol* TTBaseLabel)
Declared at: llvm/lib/CodeGen/AsmPrinter/EHStreamer.h:115
Parameters
- unsigned int TTypeEncoding
- llvm::MCSymbol* TTBaseLabel
¶void endInstruction()
void endInstruction()
Description
Process end of an instruction.
Declared at: llvm/lib/CodeGen/AsmPrinter/EHStreamer.h:131
¶static bool isCatchEHSelector(int Selector)
static bool isCatchEHSelector(int Selector)
Declared at: llvm/lib/CodeGen/AsmPrinter/EHStreamer.h:122
Parameters
- int Selector
¶static bool isCleanupEHSelector(int Selector)
static bool isCleanupEHSelector(int Selector)
Declared at: llvm/lib/CodeGen/AsmPrinter/EHStreamer.h:121
Parameters
- int Selector
¶static bool isFilterEHSelector(int Selector)
static bool isFilterEHSelector(int Selector)
Declared at: llvm/lib/CodeGen/AsmPrinter/EHStreamer.h:120
Parameters
- int Selector
¶void setSymbolSize(const llvm::MCSymbol* Sym,
uint64_t Size)
void setSymbolSize(const llvm::MCSymbol* Sym,
uint64_t Size)
Description
For symbols that have a size designated (e.g. common symbols), this tracks that size.
Declared at: llvm/lib/CodeGen/AsmPrinter/EHStreamer.h:129
Parameters
- const llvm::MCSymbol* Sym
- uint64_t Size
¶static unsigned int sharedTypeIDs(
const llvm::LandingPadInfo* L,
const llvm::LandingPadInfo* R)
static unsigned int sharedTypeIDs(
const llvm::LandingPadInfo* L,
const llvm::LandingPadInfo* R)
Description
How many leading type ids two landing pads have in common.
Declared at: llvm/lib/CodeGen/AsmPrinter/EHStreamer.h:39
Parameters
- const llvm::LandingPadInfo* L
- const llvm::LandingPadInfo* R
¶~EHStreamer()
~EHStreamer()
Declared at: llvm/lib/CodeGen/AsmPrinter/EHStreamer.h:126