9#ifndef LLDB_CORE_MANGLED_H
10#define LLDB_CORE_MANGLED_H
17#include "llvm/ADT/StringRef.h"
65 explicit Mangled(llvm::StringRef name);
73 return !(*
this == rhs);
90 explicit operator bool()
const;
Many cache files require string tables to store data efficiently.
A uniqued constant string class.
An binary data encoding class.
A class that handles mangled names.
void Encode(DataEncoder &encoder, ConstStringTable &strtab) const
Encode this object into a data encoder object.
bool NameMatches(ConstString name) const
Check if "name" matches either the mangled or demangled name.
static int Compare(const Mangled &lhs, const Mangled &rhs)
Compare the mangled string values.
static bool IsMangledName(llvm::StringRef name)
@ ePreferDemangledWithoutArguments
std::optional< DemangledNameInfo > m_demangled_info
If available, holds information about where in m_demangled certain parts of the name (e....
Mangled()=default
Default constructor.
void SetDemangledName(ConstString name)
void DumpDebug(Stream *s) const
Dump a debug description of this object to a Stream s.
static Mangled::ManglingScheme GetManglingScheme(llvm::StringRef const name)
Try to identify the mangling scheme used.
ConstString GetMangledName() const
Mangled name get accessor.
size_t MemorySize() const
Get the memory cost of this object.
bool GetRichManglingInfo(RichManglingContext &context, SkipMangledNameFn *skip_mangled_name)
Get rich mangling information.
ConstString GetDemangledName() const
Demangled name get accessor.
ConstString GetBaseName() const
Compute the base name (without namespace/class qualifiers) from the demangled name.
lldb::LanguageType GuessLanguage() const
Try to guess the language from the mangling.
bool Decode(const DataExtractor &data, lldb::offset_t *offset_ptr, const StringTableReader &strtab)
Decode a serialized version of this object from data.
void SetMangledName(ConstString name)
bool(llvm::StringRef, ManglingScheme) SkipMangledNameFn
Function signature for filtering mangled names.
ConstString & GetMangledName()
Mangled name get accessor.
bool operator==(const Mangled &rhs) const
void SetValue(ConstString name)
Set the string value in this object.
const std::optional< DemangledNameInfo > & GetDemangledInfo() const
Retrieve DemangledNameInfo of the demangled name held by this object.
ConstString GetName(NamePreference preference=ePreferDemangled) const
Best name get accessor.
bool operator!=(const Mangled &rhs) const
ConstString GetDemangledNameImpl(bool force) const
If force is false, this function will re-use the previously demangled name (if any).
ConstString m_mangled
The mangled version of the name.
ConstString m_demangled
Mutable so we can get it on demand with a const version of this object.
ConstString GetDisplayDemangledName() const
Display demangled name get accessor.
void Dump(Stream *s) const
Dump a description of this object to a Stream s.
void Clear()
Clear the mangled and demangled values.
Uniform wrapper for access to rich mangling information from different providers.
A stream class that can stream formatted output to a file.
Many cache files require string tables to store data efficiently.
A class that represents a running process on the host machine.
Stream & operator<<(Stream &s, const Mangled &obj)
LanguageType
Programming language type.