LLDB mainline
lldb_private::DemangledNameInfoCache Class Reference

A cache from mangled names to DemangledNameInfo. More...

#include <DemangledNameInfo.h>

Classes

struct  State

Public Member Functions

std::optional< DemangledNameInfo > Get (const Mangled &mangled)
 Calculates the DemangledNameInfo and caches the result.
void Clear ()
size_t GetMaxEntries () const
size_t GetNumEntries () const
void SetMaxEntries (size_t max_entries)
 Changes the maximum number of entries. A limit of 0 disables the cache.

Private Attributes

Guarded< State > m_state

Detailed Description

A cache from mangled names to DemangledNameInfo.

Definition at line 144 of file DemangledNameInfo.h.

Member Function Documentation

◆ Clear()

void lldb_private::DemangledNameInfoCache::Clear ( )

Definition at line 63 of file DemangledNameInfo.cpp.

References m_state.

◆ Get()

std::optional< DemangledNameInfo > lldb_private::DemangledNameInfoCache::Get ( const Mangled & mangled)

Calculates the DemangledNameInfo and caches the result.

Returns
std::nullopt if no info could be computed for mangled.

Definition at line 17 of file DemangledNameInfo.cpp.

References lldb_private::Mangled::ComputeDemangledInfo(), lldb_private::Mangled::GetMangledName(), and m_state.

Referenced by GetAndValidateInfo().

◆ GetMaxEntries()

size_t lldb_private::DemangledNameInfoCache::GetMaxEntries ( ) const

Definition at line 69 of file DemangledNameInfo.cpp.

References m_state.

Referenced by SetMaxEntries().

◆ GetNumEntries()

size_t lldb_private::DemangledNameInfoCache::GetNumEntries ( ) const

Definition at line 73 of file DemangledNameInfo.cpp.

References m_state.

◆ SetMaxEntries()

void lldb_private::DemangledNameInfoCache::SetMaxEntries ( size_t max_entries)

Changes the maximum number of entries. A limit of 0 disables the cache.

Definition at line 77 of file DemangledNameInfo.cpp.

References GetMaxEntries(), and m_state.

Referenced by GetDemangledInfoCache().

Member Data Documentation

◆ m_state

Guarded<State> lldb_private::DemangledNameInfoCache::m_state
private

Definition at line 177 of file DemangledNameInfo.h.

Referenced by Clear(), Get(), GetMaxEntries(), GetNumEntries(), and SetMaxEntries().


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