LLVM 19.0.0git
Public Member Functions | Static Public Member Functions | List of all members
llvm::jitlink::EHFrameCFIBlockInspector Class Reference

Inspect an eh-frame CFI record. More...

#include "llvm/ExecutionEngine/JITLink/EHFrameSupport.h"

Public Member Functions

bool isFDE () const
 Returns true if this frame is an FDE, false for a CIE.
 
bool isCIE () const
 Returns true if this frame is a CIE, false for an FDE.
 
EdgegetPersonalityEdge () const
 If this is a CIE record, returns the Edge pointing at the personality function, if any.
 
EdgegetCIEEdge () const
 If this is an FDE record, returns the Edge pointing to the CIE.
 
EdgegetPCBeginEdge () const
 If this is an FDE record, returns the Edge pointing at the PC-begin symbol.
 
EdgegetLSDAEdge () const
 If this is an FDE record, returns the Edge pointing at the LSDA, if any.
 

Static Public Member Functions

static EHFrameCFIBlockInspector FromEdgeScan (Block &B)
 Identify CFI record type and edges based on number and order of edges in the given block only.
 

Detailed Description

Inspect an eh-frame CFI record.

Definition at line 25 of file EHFrameSupport.h.

Member Function Documentation

◆ FromEdgeScan()

EHFrameCFIBlockInspector llvm::jitlink::EHFrameCFIBlockInspector::FromEdgeScan ( Block B)
static

Identify CFI record type and edges based on number and order of edges in the given block only.

This assumes that the block contains one CFI record that has already been split out and fixed by the DWARFRecordSplitter and EHFrameEdgeFixer passes.

Zero or one outgoing edges: Record is CIE. If present, edge points to personality.

Two or three outgoing edges: Record is an FDE. First edge points to CIE, second to PC-begin, third (if present) to LSDA.

It is illegal to call this function on a block with four or more edges.

Definition at line 659 of file EHFrameSupport.cpp.

References assert(), B, E, LHS, llvm::SmallVectorTemplateBase< T, bool >::push_back(), RHS, llvm::SmallVectorBase< Size_T >::size(), and llvm::sort().

◆ getCIEEdge()

Edge * llvm::jitlink::EHFrameCFIBlockInspector::getCIEEdge ( ) const
inline

If this is an FDE record, returns the Edge pointing to the CIE.

If this is a CIE record, returns null.

The result is not valid if any modification has been made to the block after parsing.

Definition at line 60 of file EHFrameSupport.h.

◆ getLSDAEdge()

Edge * llvm::jitlink::EHFrameCFIBlockInspector::getLSDAEdge ( ) const
inline

If this is an FDE record, returns the Edge pointing at the LSDA, if any.

It is illegal to call this method on CIE records.

Definition at line 69 of file EHFrameSupport.h.

References assert(), isFDE(), and LSDAEdge.

◆ getPCBeginEdge()

Edge * llvm::jitlink::EHFrameCFIBlockInspector::getPCBeginEdge ( ) const
inline

If this is an FDE record, returns the Edge pointing at the PC-begin symbol.

If this a CIE record, returns null.

Definition at line 65 of file EHFrameSupport.h.

◆ getPersonalityEdge()

Edge * llvm::jitlink::EHFrameCFIBlockInspector::getPersonalityEdge ( ) const
inline

If this is a CIE record, returns the Edge pointing at the personality function, if any.

It is illegal to call this method on FDE records.

Definition at line 50 of file EHFrameSupport.h.

References assert(), isCIE(), and PersonalityEdge.

◆ isCIE()

bool llvm::jitlink::EHFrameCFIBlockInspector::isCIE ( ) const
inline

Returns true if this frame is a CIE, false for an FDE.

Definition at line 45 of file EHFrameSupport.h.

Referenced by getPersonalityEdge().

◆ isFDE()

bool llvm::jitlink::EHFrameCFIBlockInspector::isFDE ( ) const
inline

Returns true if this frame is an FDE, false for a CIE.

Definition at line 42 of file EHFrameSupport.h.

Referenced by getLSDAEdge().

Member Data Documentation

◆ LSDAEdge

Edge* llvm::jitlink::EHFrameCFIBlockInspector::LSDAEdge

Definition at line 82 of file EHFrameSupport.h.

Referenced by getLSDAEdge().

◆ PersonalityEdge

Edge* llvm::jitlink::EHFrameCFIBlockInspector::PersonalityEdge

Definition at line 81 of file EHFrameSupport.h.

Referenced by getPersonalityEdge().


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