LLDB  mainline
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
lldb_private::FunctionInfo Class Reference

#include "lldb/Symbol/Function.h"

Inheritance diagram for lldb_private::FunctionInfo:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::FunctionInfo:
Collaboration graph
[legend]

Public Member Functions

 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...
 
virtual size_t MemorySize () const
 Get the memory cost of this object. More...
 

Static Public Member Functions

static int Compare (const FunctionInfo &lhs, const FunctionInfo &rhs)
 Compare two function information objects. More...
 

Protected Attributes

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 contains generic function information.

This provides generic function information that gets reused between inline functions and function types.

Definition at line 31 of file Function.h.

Constructor & Destructor Documentation

◆ FunctionInfo() [1/2]

FunctionInfo::FunctionInfo ( const char *  name,
const Declaration decl_ptr 
)

Construct with the function method 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]decl_ptrOptional declaration information that describes where the function was declared. This can be NULL.

Definition at line 29 of file Function.cpp.

◆ FunctionInfo() [2/2]

FunctionInfo::FunctionInfo ( ConstString  name,
const Declaration decl_ptr 
)

Construct with the function method 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]decl_ptrOptional declaration information that describes where the function was declared. This can be NULL.

Definition at line 32 of file Function.cpp.

◆ ~FunctionInfo()

FunctionInfo::~FunctionInfo ( )
virtualdefault

Destructor.

The destructor is virtual since classes inherit from this class.

Member Function Documentation

◆ Compare()

int FunctionInfo::Compare ( const FunctionInfo lhs,
const FunctionInfo rhs 
)
static

Compare two function information objects.

First compares the method names, and if equal, then compares the declaration information.

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

Definition at line 43 of file Function.cpp.

References lldb_private::Declaration::Compare(), lldb_private::ConstString::Compare(), GetName(), and m_declaration.

◆ Dump()

void FunctionInfo::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 37 of file Function.cpp.

References lldb_private::Declaration::Dump(), m_declaration, and m_name.

Referenced by lldb_private::InlineFunctionInfo::Dump().

◆ GetDeclaration() [1/2]

const Declaration & FunctionInfo::GetDeclaration ( )

Get accessor for the declaration information.

Returns
A reference to the declaration object.

Definition at line 51 of file Function.cpp.

References m_declaration.

Referenced by lldb_private::BreakpointResolverFileLine::FilterContexts(), and lldb_private::SymbolContextSpecifier::SymbolContextMatches().

◆ GetDeclaration() [2/2]

const Declaration& lldb_private::FunctionInfo::GetDeclaration ( ) const

Get const accessor for the declaration information.

Returns
A const reference to the declaration object.

◆ GetName()

ConstString FunctionInfo::GetName ( ) const

Get accessor for the method name.

Returns
A const reference to the method name object.

Definition at line 57 of file Function.cpp.

References m_name.

Referenced by Compare().

◆ MemorySize()

size_t FunctionInfo::MemorySize ( ) const
virtual

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 in lldb_private::InlineFunctionInfo.

Definition at line 59 of file Function.cpp.

References m_declaration, m_name, lldb_private::Declaration::MemorySize(), and lldb_private::ConstString::MemorySize().

Referenced by lldb_private::InlineFunctionInfo::MemorySize().

Member Data Documentation

◆ m_declaration

Declaration lldb_private::FunctionInfo::m_declaration
protected

Information describing where this function information was defined.

Definition at line 122 of file Function.h.

Referenced by Compare(), Dump(), GetDeclaration(), and MemorySize().

◆ m_name

ConstString lldb_private::FunctionInfo::m_name
protected

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