LLDB mainline
lldb_private::FunctionInfo Class Reference

A class that contains generic function information. More...

#include "lldb/Symbol/Function.h"

Inheritance diagram for lldb_private::FunctionInfo:
[legend]

Public Member Functions

 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.
Declaration & GetDeclaration ()
 Get accessor for the declaration information.
const Declaration & GetDeclaration () const
 Get const accessor for the declaration information.
ConstString GetName () const
 Get accessor for the method name.

Static Public Member Functions

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

Protected Attributes

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

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

Definition at line 34 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 32 of file Function.cpp.

References m_declaration, and m_name.

Referenced by Compare(), lldb_private::InlineFunctionInfo::InlineFunctionInfo(), lldb_private::InlineFunctionInfo::InlineFunctionInfo(), and ~FunctionInfo().

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

References m_declaration, and m_name.

◆ ~FunctionInfo()

FunctionInfo::~FunctionInfo ( )
virtualdefault

Destructor.

The destructor is virtual since classes inherit from this class.

References FunctionInfo().

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

References lldb_private::ConstString::Compare(), lldb_private::Declaration::Compare(), FunctionInfo(), 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 40 of file Function.cpp.

References m_declaration, and m_name.

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

◆ GetDeclaration() [1/2]

Declaration & FunctionInfo::GetDeclaration ( )

Get accessor for the declaration information.

Returns
A reference to the declaration object.

Definition at line 54 of file Function.cpp.

References m_declaration.

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

◆ GetDeclaration() [2/2]

const Declaration & FunctionInfo::GetDeclaration ( ) const

Get const accessor for the declaration information.

Returns
A const reference to the declaration object.

Definition at line 56 of file Function.cpp.

References m_declaration.

◆ GetName()

ConstString FunctionInfo::GetName ( ) const

Get accessor for the method name.

Returns
A const reference to the method name object.

Definition at line 60 of file Function.cpp.

References m_name.

Referenced by Compare().

Member Data Documentation

◆ m_declaration

Declaration lldb_private::FunctionInfo::m_declaration
protected

Information describing where this function information was defined.

Definition at line 115 of file Function.h.

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

◆ m_name


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