9#ifndef LLDB_CORE_MANGLED_H
10#define LLDB_CORE_MANGLED_H
17#include "llvm/ADT/StringRef.h"
89 explicit Mangled(llvm::StringRef name);
97 return !(*
this == rhs);
114 explicit operator bool()
const;
292 "High-volume object, size of object must be increased with care");
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
Mangled()=default
Default constructor.
void SetDemangledName(ConstString name)
void DumpDebug(Stream *s) const
Dump a debug description of this object to a Stream s.
std::optional< DemangledNameInfo > ComputeDemangledInfo() const
Compute the DemangledNameInfo of the demangled name.
ConstString GetMangledName() const
Mangled name get accessor.
FunctionNameKind
What a mangled function name says about the function's declaration.
@ ConstructorOrDestructor
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 operator==(const Mangled &rhs) const
void SetValue(ConstString name)
Set the string value in this object.
ConstString GetName(NamePreference preference=ePreferDemangled) const
Best name get accessor.
static constexpr size_t kNumManglingSchemes
The number of mangling schemes.
static Mangled::ManglingScheme GetManglingScheme(llvm::StringRef name)
Try to identify the mangling scheme used.
bool operator!=(const Mangled &rhs) const
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.
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.
The parts of a mangled function name used in the symbol table's indices.
ConstString basename
If empty, the symbol is only indexed by its mangled name.
ConstString decl_context
The enclosing context.