LLVM 20.0.0git
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
llvm::MCCVFunctionInfo Struct Reference

Information describing a function or inlined call site introduced by .cv_func_id or .cv_inline_site_id. More...

#include "llvm/MC/MCCodeView.h"

Classes

struct  LineInfo
 

Public Types

enum  : unsigned { FunctionSentinel = ~0U }
 

Public Member Functions

bool isUnallocatedFunctionInfo () const
 Returns true if this is function info has not yet been used in a .cv_func_id or .cv_inline_site_id directive.
 
bool isInlinedCallSite () const
 Returns true if this represents an inlined call site, meaning ParentFuncIdPlusOne is neither zero nor ~0U.
 
unsigned getParentFuncId () const
 

Public Attributes

unsigned ParentFuncIdPlusOne = 0
 If this represents an inlined call site, then ParentFuncIdPlusOne will be the parent function id plus one.
 
LineInfo InlinedAt
 
MCSectionSection = nullptr
 The section of the first .cv_loc directive used for this function, or null if none has been seen yet.
 
DenseMap< unsigned, LineInfoInlinedAtMap
 Map from inlined call site id to the inlined at location to use for that call site.
 

Detailed Description

Information describing a function or inlined call site introduced by .cv_func_id or .cv_inline_site_id.

Accumulates information from .cv_loc directives used with this function's id or the id of an inlined call site within this function or inlined call site.

Definition at line 98 of file MCCodeView.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : unsigned
Enumerator
FunctionSentinel 

Definition at line 106 of file MCCodeView.h.

Member Function Documentation

◆ getParentFuncId()

unsigned llvm::MCCVFunctionInfo::getParentFuncId ( ) const
inline

Definition at line 137 of file MCCodeView.h.

References assert(), isInlinedCallSite(), and ParentFuncIdPlusOne.

◆ isInlinedCallSite()

bool llvm::MCCVFunctionInfo::isInlinedCallSite ( ) const
inline

Returns true if this represents an inlined call site, meaning ParentFuncIdPlusOne is neither zero nor ~0U.

Definition at line 132 of file MCCodeView.h.

References FunctionSentinel, isUnallocatedFunctionInfo(), and ParentFuncIdPlusOne.

Referenced by getParentFuncId().

◆ isUnallocatedFunctionInfo()

bool llvm::MCCVFunctionInfo::isUnallocatedFunctionInfo ( ) const
inline

Returns true if this is function info has not yet been used in a .cv_func_id or .cv_inline_site_id directive.

Definition at line 128 of file MCCodeView.h.

References ParentFuncIdPlusOne.

Referenced by isInlinedCallSite().

Member Data Documentation

◆ InlinedAt

LineInfo llvm::MCCVFunctionInfo::InlinedAt

Definition at line 114 of file MCCodeView.h.

◆ InlinedAtMap

DenseMap<unsigned, LineInfo> llvm::MCCVFunctionInfo::InlinedAtMap

Map from inlined call site id to the inlined at location to use for that call site.

Call chains are collapsed, so for the call chain 'f -> g -> h', the InlinedAtMap of 'f' will contain entries for 'g' and 'h' that both list the line info for the 'g' call site.

Definition at line 124 of file MCCodeView.h.

Referenced by llvm::CodeViewContext::encodeInlineLineTable(), llvm::CodeViewContext::getFunctionLineEntries(), and llvm::CodeViewContext::getLineExtentIncludingInlinees().

◆ ParentFuncIdPlusOne

unsigned llvm::MCCVFunctionInfo::ParentFuncIdPlusOne = 0

If this represents an inlined call site, then ParentFuncIdPlusOne will be the parent function id plus one.

If this represents a normal function, then there is no parent, and ParentFuncIdPlusOne will be FunctionSentinel. If this struct is an unallocated slot in the function info vector, then ParentFuncIdPlusOne will be zero.

Definition at line 104 of file MCCodeView.h.

Referenced by getParentFuncId(), isInlinedCallSite(), and isUnallocatedFunctionInfo().

◆ Section

MCSection* llvm::MCCVFunctionInfo::Section = nullptr

The section of the first .cv_loc directive used for this function, or null if none has been seen yet.

Definition at line 118 of file MCCodeView.h.

Referenced by llvm::MCStreamer::checkCVLocSection().


The documentation for this struct was generated from the following file: