LLVM 20.0.0git
Public Member Functions | Protected Member Functions | List of all members
llvm::WasmException Class Reference

#include "CodeGen/AsmPrinter/WasmException.h"

Inheritance diagram for llvm::WasmException:
Inheritance graph
[legend]

Public Member Functions

 WasmException (AsmPrinter *A)
 
void endModule () override
 Emit all sections that should come after the content.
 
void beginFunction (const MachineFunction *MF) override
 Gather pre-function debug information.
 
void endFunction (const MachineFunction *MF) override
 Gather post-function debug information.
 
- Public Member Functions inherited from llvm::EHStreamer
 EHStreamer (AsmPrinter *A)
 
 ~EHStreamer () override
 
- Public Member Functions inherited from llvm::AsmPrinterHandler
virtual ~AsmPrinterHandler ()
 Pin vtable to this file.
 
virtual void beginModule (Module *M)
 
virtual void endModule ()=0
 Emit all sections that should come after the content.
 
virtual void beginFunction (const MachineFunction *MF)=0
 Gather pre-function debug information.
 
virtual void markFunctionEnd ()
 
virtual void endFunction (const MachineFunction *MF)=0
 Gather post-function debug information.
 
virtual void beginBasicBlockSection (const MachineBasicBlock &MBB)
 Process the beginning of a new basic-block-section within a function.
 
virtual void endBasicBlockSection (const MachineBasicBlock &MBB)
 Process the end of a basic-block-section within a function.
 
virtual void beginFunclet (const MachineBasicBlock &MBB, MCSymbol *Sym=nullptr)
 Emit target-specific EH funclet machinery.
 
virtual void endFunclet ()
 

Protected Member Functions

void computeCallSiteTable (SmallVectorImpl< CallSiteEntry > &CallSites, SmallVectorImpl< CallSiteRange > &CallSiteRanges, const SmallVectorImpl< const LandingPadInfo * > &LandingPads, const SmallVectorImpl< unsigned > &FirstActions) override
 Compute the call-site table and the call-site ranges.
 
- 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.
 
void computePadMap (const SmallVectorImpl< const LandingPadInfo * > &LandingPads, RangeMapType &PadMap)
 
virtual void computeCallSiteTable (SmallVectorImpl< CallSiteEntry > &CallSites, SmallVectorImpl< CallSiteRange > &CallSiteRanges, const SmallVectorImpl< const LandingPadInfo * > &LandingPads, const SmallVectorImpl< unsigned > &FirstActions)
 Compute the call-site table and the call-site ranges.
 
MCSymbolemitExceptionTable ()
 Emit landing pads and actions.
 
virtual void emitTypeInfos (unsigned TTypeEncoding, MCSymbol *TTBaseLabel)
 

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’.
 
- Protected Types inherited from llvm::EHStreamer
using RangeMapType = DenseMap< MCSymbol *, PadRange >
 
- 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.
 
static bool isFilterEHSelector (int Selector)
 
static bool isCleanupEHSelector (int Selector)
 
static bool isCatchEHSelector (int Selector)
 
- Protected Attributes inherited from llvm::EHStreamer
AsmPrinterAsm
 Target of directive emission.
 
MachineModuleInfoMMI
 Collected machine module information.
 

Detailed Description

Definition at line 25 of file WasmException.h.

Constructor & Destructor Documentation

◆ WasmException()

llvm::WasmException::WasmException ( AsmPrinter A)
inline

Definition at line 27 of file WasmException.h.

Member Function Documentation

◆ beginFunction()

void llvm::WasmException::beginFunction ( const MachineFunction MF)
inlineoverridevirtual

Gather pre-function debug information.

Every beginFunction(MF) call should be followed by an endFunction(MF) call.

Implements llvm::AsmPrinterHandler.

Definition at line 30 of file WasmException.h.

◆ computeCallSiteTable()

void WasmException::computeCallSiteTable ( SmallVectorImpl< CallSiteEntry > &  CallSites,
SmallVectorImpl< CallSiteRange > &  CallSiteRanges,
const SmallVectorImpl< const LandingPadInfo * > &  LandingPads,
const SmallVectorImpl< unsigned > &  FirstActions 
)
overrideprotectedvirtual

Compute the call-site table and the call-site ranges.

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. CallSiteRanges vector is only populated for Itanium exception handling.

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.

Call-sites are split into one or more call-site ranges associated with different sections of the function.

  • Without -basic-block-sections, all call-sites are grouped into one call-site-range corresponding to the function section.
  • With -basic-block-sections, one call-site range is created for each section, with its FragmentBeginLabel and FragmentEndLabel respectively

Reimplemented from llvm::EHStreamer.

Definition at line 78 of file WasmException.cpp.

References llvm::EHStreamer::Asm, llvm::MachineFunction::getWasmLandingPadIndex(), llvm::MachineFunction::hasWasmLandingPadIndex(), I, Info, llvm::AsmPrinter::MF, N, llvm::SmallVectorImpl< T >::resize(), and llvm::SmallVectorBase< Size_T >::size().

◆ endFunction()

void WasmException::endFunction ( const MachineFunction MF)
overridevirtual

◆ endModule()

void WasmException::endModule ( )
overridevirtual

The documentation for this class was generated from the following files: