9#ifndef LLDB_CORE_MANGLED_H
10#define LLDB_CORE_MANGLED_H
11#if defined(__cplusplus)
17#include "llvm/ADT/StringRef.h"
39 ePreferDemangledWithoutArguments
43 eManglingSchemeNone = 0,
45 eManglingSchemeItanium,
46 eManglingSchemeRustV0,
62 explicit Mangled(ConstString name);
64 explicit Mangled(llvm::StringRef name);
67 return m_mangled == rhs.m_mangled &&
68 GetDemangledName() == rhs.GetDemangledName();
72 return !(*
this == rhs);
89 explicit operator bool()
const;
108 static int Compare(
const Mangled &lhs,
const Mangled &rhs);
117 void Dump(Stream *s)
const;
123 void DumpDebug(Stream *s)
const;
129 ConstString GetDemangledName()
const;
135 ConstString GetDisplayDemangledName()
const;
137 void SetDemangledName(ConstString name) { m_demangled = name; }
139 void SetMangledName(ConstString name) { m_mangled = name; }
145 ConstString &GetMangledName() {
return m_mangled; }
151 ConstString GetMangledName()
const {
return m_mangled; }
162 ConstString
GetName(NamePreference preference = ePreferDemangled)
const;
172 if (m_mangled == name)
174 return GetDemangledName() == name;
176 bool NameMatches(
const RegularExpression ®ex)
const;
186 size_t MemorySize()
const;
195 void SetValue(ConstString name);
214 using SkipMangledNameFn = bool(llvm::StringRef, ManglingScheme);
237 bool GetRichManglingInfo(RichManglingContext &context,
238 SkipMangledNameFn *skip_mangled_name);
247 static Mangled::ManglingScheme GetManglingScheme(llvm::StringRef
const name);
262 bool Decode(
const DataExtractor &data,
lldb::offset_t *offset_ptr,
263 const StringTableReader &strtab);
276 void Encode(DataEncoder &encoder, ConstStringTable &strtab)
const;
280 ConstString m_mangled;
281 mutable ConstString m_demangled;
285Stream &
operator<<(Stream &s,
const Mangled &obj);
static bool Compare(BreakpointLocationSP lhs, lldb::break_id_t val)
bool operator!=(const DWARFBaseDIE &lhs, const DWARFBaseDIE &rhs)
bool operator==(const DWARFBaseDIE &lhs, const DWARFBaseDIE &rhs)
static llvm::StringRef GetName(XcodeSDK::Type type)
A class that represents a running process on the host machine.
bool NameMatches(llvm::StringRef name, NameMatch match_type, llvm::StringRef match)
Stream & operator<<(Stream &s, const SourceLocationSpec &loc)
Dump a SourceLocationSpec object to a stream.
LanguageType
Programming language type.