LLDB mainline
Public Member Functions | Private Attributes | List of all members
lldb_private::InlineFunctionInfo Class Reference

A class that describes information for an inlined function. More...

#include "lldb/Symbol/Function.h"

Inheritance diagram for lldb_private::InlineFunctionInfo:
Inheritance graph
[legend]

Public Member Functions

 InlineFunctionInfo (const char *name, llvm::StringRef mangled, const Declaration *decl_ptr, const Declaration *call_decl_ptr)
 Construct with the function method name, mangled name, and optional declaration information.
 
 InlineFunctionInfo (ConstString name, const Mangled &mangled, const Declaration *decl_ptr, const Declaration *call_decl_ptr)
 Construct with the function method name, mangled name, and optional declaration information.
 
 ~InlineFunctionInfo () override
 Destructor.
 
int Compare (const InlineFunctionInfo &lhs, const InlineFunctionInfo &rhs)
 Compare two inlined function information objects.
 
void Dump (Stream *s, bool show_fullpaths) const
 Dump a description of this object to a Stream.
 
void DumpStopContext (Stream *s) const
 
ConstString GetName () const
 
ConstString GetDisplayName () const
 
DeclarationGetCallSite ()
 Get accessor for the call site declaration information.
 
const DeclarationGetCallSite () const
 Get const accessor for the call site declaration information.
 
MangledGetMangled ()
 Get accessor for the mangled name object.
 
const MangledGetMangled () const
 Get const accessor for the mangled name object.
 
size_t MemorySize () const override
 Get the memory cost of this object.
 
- Public Member Functions inherited from lldb_private::FunctionInfo
 FunctionInfo (const char *name, const Declaration *decl_ptr)
 Construct with the function method name and optional declaration information.
 
 FunctionInfo (ConstString name, const Declaration *decl_ptr)
 Construct with the function method name and optional declaration information.
 
virtual ~FunctionInfo ()
 Destructor.
 
void Dump (Stream *s, bool show_fullpaths) const
 Dump a description of this object to a Stream.
 
DeclarationGetDeclaration ()
 Get accessor for the declaration information.
 
const DeclarationGetDeclaration () const
 Get const accessor for the declaration information.
 
ConstString GetName () const
 Get accessor for the method name.
 
virtual size_t MemorySize () const
 Get the memory cost of this object.
 

Private Attributes

Mangled m_mangled
 Mangled inlined function name (can be empty if there is no mangled information).
 
Declaration m_call_decl
 

Additional Inherited Members

- Static Public Member Functions inherited from lldb_private::FunctionInfo
static int Compare (const FunctionInfo &lhs, const FunctionInfo &rhs)
 Compare two function information objects.
 
- Protected Attributes inherited from lldb_private::FunctionInfo
ConstString m_name
 Function method name (not a mangled name).
 
Declaration m_declaration
 Information describing where this function information was defined.
 

Detailed Description

A class that describes information for an inlined function.

Definition at line 125 of file Function.h.

Constructor & Destructor Documentation

◆ InlineFunctionInfo() [1/2]

InlineFunctionInfo::InlineFunctionInfo ( const char *  name,
llvm::StringRef  mangled,
const Declaration decl_ptr,
const Declaration call_decl_ptr 
)

Construct with the function method name, mangled name, and optional declaration information.

Parameters
[in]nameA C string name for the method name for this function. This value should not be the mangled named, but the simple method name.
[in]mangledA C string name for the mangled name for this function. This value can be NULL if there is no mangled information.
[in]decl_ptrOptional declaration information that describes where the function was declared. This can be NULL.
[in]call_decl_ptrOptional calling location declaration information that describes from where this inlined function was called.

Definition at line 65 of file Function.cpp.

◆ InlineFunctionInfo() [2/2]

InlineFunctionInfo::InlineFunctionInfo ( ConstString  name,
const Mangled mangled,
const Declaration decl_ptr,
const Declaration call_decl_ptr 
)

Construct with the function method name, mangled name, and optional declaration information.

Parameters
[in]nameA name for the method name for this function. This value should not be the mangled named, but the simple method name.
[in]mangledA name for the mangled name for this function. This value can be empty if there is no mangled information.
[in]decl_ptrOptional declaration information that describes where the function was declared. This can be NULL.
[in]call_decl_ptrOptional calling location declaration information that describes from where this inlined function was called.

Definition at line 72 of file Function.cpp.

◆ ~InlineFunctionInfo()

InlineFunctionInfo::~InlineFunctionInfo ( )
overridedefault

Destructor.

Member Function Documentation

◆ Compare()

int lldb_private::InlineFunctionInfo::Compare ( const InlineFunctionInfo lhs,
const InlineFunctionInfo rhs 
)

Compare two inlined function information objects.

First compares the FunctionInfo objects, and if equal, compares the mangled names.

Parameters
[in]lhsThe Left Hand Side const InlineFunctionInfo object reference.
[in]rhsThe Right Hand Side const InlineFunctionInfo object reference.
Returns
-1 if lhs < rhs 0 if lhs == rhs 1 if lhs > rhs

◆ Dump()

void InlineFunctionInfo::Dump ( Stream s,
bool  show_fullpaths 
) const

Dump a description of this object to a Stream.

Dump a description of the contents of this object to the supplied stream s.

Parameters
[in]sThe stream to which to dump the object description.

Definition at line 81 of file Function.cpp.

References lldb_private::Mangled::Dump(), lldb_private::FunctionInfo::Dump(), and m_mangled.

◆ DumpStopContext()

void InlineFunctionInfo::DumpStopContext ( Stream s) const

◆ GetCallSite() [1/2]

Declaration & InlineFunctionInfo::GetCallSite ( )

Get accessor for the call site declaration information.

Returns
A reference to the declaration object.

Definition at line 108 of file Function.cpp.

References m_call_decl.

Referenced by lldb::SBBlock::GetInlinedCallSiteColumn(), lldb::SBBlock::GetInlinedCallSiteFile(), lldb::SBBlock::GetInlinedCallSiteLine(), and lldb_private::SymbolContext::GetParentOfInlinedScope().

◆ GetCallSite() [2/2]

const Declaration & InlineFunctionInfo::GetCallSite ( ) const

Get const accessor for the call site declaration information.

Returns
A const reference to the declaration object.

Definition at line 110 of file Function.cpp.

References m_call_decl.

◆ GetDisplayName()

ConstString InlineFunctionInfo::GetDisplayName ( ) const

◆ GetMangled() [1/2]

Mangled & InlineFunctionInfo::GetMangled ( )

Get accessor for the mangled name object.

Returns
A reference to the mangled name object.

Definition at line 114 of file Function.cpp.

References m_mangled.

Referenced by lldb_private::SymbolContextSpecifier::SymbolContextMatches().

◆ GetMangled() [2/2]

const Mangled & InlineFunctionInfo::GetMangled ( ) const

Get const accessor for the mangled name object.

Returns
A const reference to the mangled name object.

Definition at line 116 of file Function.cpp.

References m_mangled.

◆ GetName()

ConstString InlineFunctionInfo::GetName ( ) const

◆ MemorySize()

size_t InlineFunctionInfo::MemorySize ( ) const
overridevirtual

Get the memory cost of this object.

Returns
The number of bytes that this object occupies in memory. The returned value does not include the bytes for any shared string values.

Reimplemented from lldb_private::FunctionInfo.

Definition at line 118 of file Function.cpp.

References m_mangled, lldb_private::Mangled::MemorySize(), and lldb_private::FunctionInfo::MemorySize().

Member Data Documentation

◆ m_call_decl

Declaration lldb_private::InlineFunctionInfo::m_call_decl
private

Definition at line 246 of file Function.h.

Referenced by GetCallSite().

◆ m_mangled

Mangled lldb_private::InlineFunctionInfo::m_mangled
private

Mangled inlined function name (can be empty if there is no mangled information).

Definition at line 244 of file Function.h.

Referenced by Dump(), DumpStopContext(), GetDisplayName(), GetMangled(), GetName(), and MemorySize().


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