12#include "llvm/ADT/StringRef.h"
35 assert(new_provider !=
None &&
"Only reset to a valid provider");
50 LLDB_LOG(log,
"demangled itanium: {0} -> error: failed to demangle",
71 return m_ipd.isCtorOrDtor();
75 return base_name.starts_with(
"~");
80 llvm_unreachable(
"Fully covered switch above!");
86 if (LLVM_UNLIKELY(ipd_res ==
nullptr)) {
88 "Failed IPD queries keep the original size in the N parameter");
95 assert(ipd_res[res_size - 1] ==
'\0' &&
96 "IPD returns null-terminated strings and we rely on that");
104 LLDB_LOG(log,
"ItaniumPartialDemangler Realloc: new buffer size is {0}",
109 return llvm::StringRef(
m_ipd_buf, res_size - 1);
125 llvm_unreachable(
"Fully covered switch above!");
141 llvm_unreachable(
"Fully covered switch above!");
157 llvm_unreachable(
"Fully covered switch above!");
#define LLDB_LOG(log,...)
The LLDB_LOG* macros defined below are the way to emit log messages.
A uniqued constant string class.
const char * GetCString() const
Get the string value as a C string.
static Language * FindPlugin(lldb::LanguageType language)
llvm::StringRef ParseFunctionDeclContextName()
Get the context name for a function.
@ ItaniumPartialDemangler
llvm::StringRef ParseFunctionBaseName()
Get the base name of a function.
void ResetProvider(InfoProvider new_provider)
Clean up memory and set a new info provider for this instance.
bool FromItaniumName(ConstString mangled)
Use the ItaniumPartialDemangler to obtain rich mangling information from the given mangled name.
char * m_ipd_buf
Note: m_ipd_buf is a raw pointer due to being resized by realloc via ItaniumPartialDemangler.
llvm::StringRef processIPDStrResult(char *ipd_res, size_t res_len)
Uniform handling of string buffers for ItaniumPartialDemangler.
std::unique_ptr< Language::MethodName > m_cxx_method_parser
bool FromCxxMethodName(ConstString demangled)
Use the legacy language parser implementation to obtain rich mangling information from the given dema...
void ResetCxxMethodParser()
Clean up memory when using PluginCxxLanguage.
InfoProvider m_provider
Selects the rich mangling info provider.
llvm::StringRef ParseFullName()
Get the entire demangled name.
llvm::ItaniumPartialDemangler m_ipd
Members for ItaniumPartialDemangler.
bool IsCtorOrDtor() const
If this symbol describes a constructor or destructor.
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
@ eLanguageTypeC_plus_plus
ISO C++:1998.