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]
Collaboration diagram for lldb_private::InlineFunctionInfo:
Collaboration 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. More...
 
 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. More...
 
 ~InlineFunctionInfo () override
 Destructor. More...
 
int Compare (const InlineFunctionInfo &lhs, const InlineFunctionInfo &rhs)
 Compare two inlined function information objects. More...
 
void Dump (Stream *s, bool show_fullpaths) const
 Dump a description of this object to a Stream. More...
 
void DumpStopContext (Stream *s) const
 
ConstString GetName () const
 
ConstString GetDisplayName () const
 
DeclarationGetCallSite ()
 Get accessor for the call site declaration information. More...
 
const DeclarationGetCallSite () const
 Get const accessor for the call site declaration information. More...
 
Mangled & GetMangled ()
 Get accessor for the mangled name object. More...
 
const Mangled & GetMangled () const
 Get const accessor for the mangled name object. More...
 
size_t MemorySize () const override
 Get the memory cost of this object. More...
 
- 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. More...
 
 FunctionInfo (ConstString name, const Declaration *decl_ptr)
 Construct with the function method name and optional declaration information. More...
 
virtual ~FunctionInfo ()
 Destructor. More...
 
void Dump (Stream *s, bool show_fullpaths) const
 Dump a description of this object to a Stream. More...
 
DeclarationGetDeclaration ()
 Get accessor for the declaration information. More...
 
const DeclarationGetDeclaration () const
 Get const accessor for the declaration information. More...
 
ConstString GetName () const
 Get accessor for the method name. More...
 

Private Attributes

Mangled m_mangled
 Mangled inlined function name (can be empty if there is no mangled information). More...
 
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. More...
 
- Protected Attributes inherited from lldb_private::FunctionInfo
ConstString m_name
 Function method name (not a mangled name). More...
 
Declaration m_declaration
 Information describing where this function information was defined. More...
 

Detailed Description

A class that describes information for an inlined function.

Definition at line 127 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 63 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 70 of file Function.cpp.

◆ ~InlineFunctionInfo()

InlineFunctionInfo::~InlineFunctionInfo ( )
override

Destructor.

Definition at line 77 of file Function.cpp.

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 79 of file Function.cpp.

References 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 106 of file Function.cpp.

References m_call_decl.

Referenced by lldb_private::SymbolContext::DumpStopContext(), 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 108 of file Function.cpp.

References m_call_decl.

◆ GetDisplayName()

ConstString InlineFunctionInfo::GetDisplayName ( ) const

Definition at line 100 of file Function.cpp.

References m_mangled, and lldb_private::FunctionInfo::m_name.

Referenced by lldb::SBFrame::GetDisplayFunctionName().

◆ GetMangled() [1/2]

Mangled & InlineFunctionInfo::GetMangled ( )

Get accessor for the mangled name object.

Returns
A reference to the mangled name object.

Definition at line 112 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 114 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.
See also
ConstString::StaticMemorySize ()

Reimplemented from lldb_private::FunctionInfo.

Definition at line 116 of file Function.cpp.

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

Member Data Documentation

◆ m_call_decl

Declaration lldb_private::InlineFunctionInfo::m_call_decl
private

Definition at line 250 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 248 of file Function.h.

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


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