Pass ConstString by value (NFC)

My apologies for the large patch. With the exception of ConstString.h
itself it was entirely produced by sed.

ConstString has exactly one const char * data member, so passing a
ConstString by reference is not any more efficient than copying it by
value. In both cases a single pointer is passed. But passing it by
value makes it harder to accidentally return the address of a local
object.

(This fixes rdar://problem/48640859 for the Apple folks)

Differential Revision: https://reviews.llvm.org/D59030

llvm-svn: 355553
This commit is contained in:
Adrian Prantl 2019-03-06 21:22:25 +00:00
parent 480bce28ff
commit 0e4c482124
209 changed files with 824 additions and 825 deletions

View File

@ -35,7 +35,7 @@ StructuredDataPlugin instances have the following characteristics:
```C++
virtual Error
ConfigureStructuredData(const ConstString &type_name,
ConfigureStructuredData(ConstString type_name,
const StructuredData::ObjectSP &config_sp)
```
@ -110,7 +110,7 @@ StructuredDataPlugin instances have the following characteristics:
```C++
virtual Error
ConfigureStructuredData(const ConstString &type_name,
ConfigureStructuredData(ConstString type_name,
const StructuredData::ObjectSP &config_sp)
```

View File

@ -82,7 +82,7 @@ namespace lldb_private {
class Breakpoint : public std::enable_shared_from_this<Breakpoint>,
public Stoppoint {
public:
static const ConstString &GetEventIdentifier();
static ConstString GetEventIdentifier();
//------------------------------------------------------------------
/// An enum specifying the match style for breakpoint settings. At present
@ -108,9 +108,9 @@ public:
~BreakpointEventData() override;
static const ConstString &GetFlavorString();
static ConstString GetFlavorString();
const ConstString &GetFlavor() const override;
ConstString GetFlavor() const override;
lldb::BreakpointEventType GetBreakpointEventType() const;
@ -575,7 +575,7 @@ public:
/// the
/// description.
//------------------------------------------------------------------
bool GetMatchingFileLine(const ConstString &filename, uint32_t line_number,
bool GetMatchingFileLine(ConstString filename, uint32_t line_number,
BreakpointLocationCollection &loc_coll);
void GetFilterDescription(Stream *s);

View File

@ -136,13 +136,13 @@ public:
}
};
BreakpointName(const ConstString &name, const char *help = nullptr) :
BreakpointName(ConstString name, const char *help = nullptr) :
m_name(name), m_options(false)
{
SetHelp(help);
}
BreakpointName(const ConstString &name,
BreakpointName(ConstString name,
BreakpointOptions &options,
const Permissions &permissions = Permissions(),
const char *help = nullptr) :
@ -156,10 +156,10 @@ public:
m_permissions(rhs.m_permissions), m_help(rhs.m_help)
{}
BreakpointName(const ConstString &name, const Breakpoint &bkpt,
BreakpointName(ConstString name, const Breakpoint &bkpt,
const char *help);
const ConstString &GetName() const { return m_name; }
ConstString GetName() const { return m_name; }
BreakpointOptions &GetOptions() { return m_options; }
const BreakpointOptions &GetOptions() const { return m_options; }

View File

@ -87,7 +87,7 @@ protected:
lldb::LanguageType m_language;
bool m_skip_prologue;
void AddNameLookup(const ConstString &name,
void AddNameLookup(ConstString name,
lldb::FunctionNameType name_type_mask);
};

View File

@ -31,9 +31,9 @@ public:
~WatchpointEventData() override;
static const ConstString &GetFlavorString();
static ConstString GetFlavorString();
const ConstString &GetFlavor() const override;
ConstString GetFlavor() const override;
lldb::WatchpointEventType GetWatchpointEventType() const;

View File

@ -110,7 +110,7 @@ public:
static lldb::DebuggerSP FindDebuggerWithID(lldb::user_id_t id);
static lldb::DebuggerSP
FindDebuggerWithInstanceName(const ConstString &instance_name);
FindDebuggerWithInstanceName(ConstString instance_name);
static size_t GetNumDebuggers();
@ -310,7 +310,7 @@ public:
bool GetNotifyVoid() const;
const ConstString &GetInstanceName() { return m_instance_name; }
ConstString GetInstanceName() { return m_instance_name; }
bool LoadPlugin(const FileSpec &spec, Status &error);

View File

@ -413,7 +413,7 @@ public:
static bool
Disassemble(Debugger &debugger, const ArchSpec &arch, const char *plugin_name,
const char *flavor, const ExecutionContext &exe_ctx,
const ConstString &name, Module *module,
ConstString name, Module *module,
uint32_t num_instructions, bool mixed_source_and_assembly,
uint32_t num_mixed_context_lines, uint32_t options, Stream &strm);

View File

@ -68,7 +68,7 @@ public:
/// If \b true then \a name is a mangled name, if \b false then
/// \a name is demangled.
//----------------------------------------------------------------------
Mangled(const ConstString &name, bool is_mangled);
Mangled(ConstString name, bool is_mangled);
Mangled(llvm::StringRef name, bool is_mangled);
//----------------------------------------------------------------------
@ -80,7 +80,7 @@ public:
/// @param[in] name
/// The already const name to copy into this object.
//----------------------------------------------------------------------
explicit Mangled(const ConstString &name);
explicit Mangled(ConstString name);
explicit Mangled(llvm::StringRef name);
@ -176,7 +176,7 @@ public:
/// @return
/// A const reference to the demangled name string object.
//----------------------------------------------------------------------
const ConstString &GetDemangledName(lldb::LanguageType language) const;
ConstString GetDemangledName(lldb::LanguageType language) const;
//----------------------------------------------------------------------
/// Display demangled name get accessor.
@ -186,9 +186,9 @@ public:
//----------------------------------------------------------------------
ConstString GetDisplayDemangledName(lldb::LanguageType language) const;
void SetDemangledName(const ConstString &name) { m_demangled = name; }
void SetDemangledName(ConstString name) { m_demangled = name; }
void SetMangledName(const ConstString &name) { m_mangled = name; }
void SetMangledName(ConstString name) { m_mangled = name; }
//----------------------------------------------------------------------
/// Mangled name get accessor.
@ -204,7 +204,7 @@ public:
/// @return
/// A const reference to the mangled name string object.
//----------------------------------------------------------------------
const ConstString &GetMangledName() const { return m_mangled; }
ConstString GetMangledName() const { return m_mangled; }
//----------------------------------------------------------------------
/// Best name get accessor.
@ -229,7 +229,7 @@ public:
/// @return
/// \b True if \a name matches either name, \b false otherwise.
//----------------------------------------------------------------------
bool NameMatches(const ConstString &name, lldb::LanguageType language) const {
bool NameMatches(ConstString name, lldb::LanguageType language) const {
if (m_mangled == name)
return true;
return GetDemangledName(language) == name;
@ -264,7 +264,7 @@ public:
/// If \b true then \a name is a mangled name, if \b false then
/// \a name is demangled.
//----------------------------------------------------------------------
void SetValue(const ConstString &name, bool is_mangled);
void SetValue(ConstString name, bool is_mangled);
//----------------------------------------------------------------------
/// Set the string value in this object.
@ -275,7 +275,7 @@ public:
/// @param[in] name
/// The already const version of the name for this object.
//----------------------------------------------------------------------
void SetValue(const ConstString &name);
void SetValue(ConstString name);
//----------------------------------------------------------------------
/// Try to guess the language from the mangling.

View File

@ -293,10 +293,10 @@ public:
/// nullptr otherwise.
//------------------------------------------------------------------
const Symbol *FindFirstSymbolWithNameAndType(
const ConstString &name,
ConstString name,
lldb::SymbolType symbol_type = lldb::eSymbolTypeAny);
size_t FindSymbolsWithNameAndType(const ConstString &name,
size_t FindSymbolsWithNameAndType(ConstString name,
lldb::SymbolType symbol_type,
SymbolContextList &sc_list);
@ -321,7 +321,7 @@ public:
/// @return
/// The number of symbol contexts that were added to \a sc_list
//------------------------------------------------------------------
size_t FindFunctionSymbols(const ConstString &name, uint32_t name_type_mask,
size_t FindFunctionSymbols(ConstString name, uint32_t name_type_mask,
SymbolContextList &sc_list);
//------------------------------------------------------------------
@ -378,7 +378,7 @@ public:
/// @return
/// The number of matches added to \a sc_list.
//------------------------------------------------------------------
size_t FindFunctions(const ConstString &name,
size_t FindFunctions(ConstString name,
const CompilerDeclContext *parent_decl_ctx,
lldb::FunctionNameType name_type_mask, bool symbols_ok,
bool inlines_ok, bool append,
@ -457,7 +457,7 @@ public:
/// @return
/// The number of matches added to \a variable_list.
//------------------------------------------------------------------
size_t FindGlobalVariables(const ConstString &name,
size_t FindGlobalVariables(ConstString name,
const CompilerDeclContext *parent_decl_ctx,
size_t max_matches, VariableList &variable_list);
@ -516,12 +516,12 @@ public:
/// The number of matches added to \a type_list.
//------------------------------------------------------------------
size_t
FindTypes(const ConstString &type_name, bool exact_match, size_t max_matches,
FindTypes(ConstString type_name, bool exact_match, size_t max_matches,
llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
TypeList &types);
lldb::TypeSP FindFirstType(const SymbolContext &sc,
const ConstString &type_name, bool exact_match);
ConstString type_name, bool exact_match);
//------------------------------------------------------------------
/// Find types by name that are in a namespace. This function is used by the
@ -541,7 +541,7 @@ public:
/// @return
/// The number of matches added to \a type_list.
//------------------------------------------------------------------
size_t FindTypesInNamespace(const ConstString &type_name,
size_t FindTypesInNamespace(ConstString type_name,
const CompilerDeclContext *parent_decl_ctx,
size_t max_matches, TypeList &type_list);
@ -649,7 +649,7 @@ public:
lldb::CompUnitSP GetCompileUnitAtIndex(size_t idx);
const ConstString &GetObjectName() const;
ConstString GetObjectName() const;
uint64_t GetObjectOffset() const { return m_object_offset; }
@ -917,7 +917,7 @@ public:
lldb::SymbolContextItem resolve_scope, SymbolContextList &sc_list);
void SetFileSpecAndObjectName(const FileSpec &file,
const ConstString &object_name);
ConstString object_name);
bool GetIsDynamicLinkEditor();
@ -1036,16 +1036,16 @@ public:
m_name_type_mask(lldb::eFunctionNameTypeNone),
m_match_name_after_lookup(false) {}
LookupInfo(const ConstString &name, lldb::FunctionNameType name_type_mask,
LookupInfo(ConstString name, lldb::FunctionNameType name_type_mask,
lldb::LanguageType language);
const ConstString &GetName() const { return m_name; }
ConstString GetName() const { return m_name; }
void SetName(const ConstString &name) { m_name = name; }
void SetName(ConstString name) { m_name = name; }
const ConstString &GetLookupName() const { return m_lookup_name; }
ConstString GetLookupName() const { return m_lookup_name; }
void SetLookupName(const ConstString &name) { m_lookup_name = name; }
void SetLookupName(ConstString name) { m_lookup_name = name; }
lldb::FunctionNameType GetNameTypeMask() const { return m_name_type_mask; }
@ -1188,7 +1188,7 @@ private:
Module(); // Only used internally by CreateJITModule ()
size_t FindTypes_Impl(
const ConstString &name, const CompilerDeclContext *parent_decl_ctx,
ConstString name, const CompilerDeclContext *parent_decl_ctx,
bool append, size_t max_matches,
llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
TypeMap &types);

View File

@ -299,7 +299,7 @@ public:
//------------------------------------------------------------------
/// @see Module::FindFunctions ()
//------------------------------------------------------------------
size_t FindFunctions(const ConstString &name,
size_t FindFunctions(ConstString name,
lldb::FunctionNameType name_type_mask,
bool include_symbols, bool include_inlines, bool append,
SymbolContextList &sc_list) const;
@ -307,7 +307,7 @@ public:
//------------------------------------------------------------------
/// @see Module::FindFunctionSymbols ()
//------------------------------------------------------------------
size_t FindFunctionSymbols(const ConstString &name,
size_t FindFunctionSymbols(ConstString name,
lldb::FunctionNameType name_type_mask,
SymbolContextList &sc_list);
@ -335,7 +335,7 @@ public:
/// @return
/// The number of matches added to \a variable_list.
//------------------------------------------------------------------
size_t FindGlobalVariables(const ConstString &name, size_t max_matches,
size_t FindGlobalVariables(ConstString name, size_t max_matches,
VariableList &variable_list) const;
//------------------------------------------------------------------
@ -403,7 +403,7 @@ public:
lldb::ModuleSP FindFirstModule(const ModuleSpec &module_spec) const;
size_t FindSymbolsWithNameAndType(const ConstString &name,
size_t FindSymbolsWithNameAndType(ConstString name,
lldb::SymbolType symbol_type,
SymbolContextList &sc_list,
bool append = false) const;
@ -446,7 +446,7 @@ public:
/// @return
/// The number of matches added to \a type_list.
//------------------------------------------------------------------
size_t FindTypes(Module *search_first, const ConstString &name,
size_t FindTypes(Module *search_first, ConstString name,
bool name_is_fully_qualified, size_t max_matches,
llvm::DenseSet<SymbolFile *> &searched_symbol_files,
TypeList &types) const;

View File

@ -124,7 +124,7 @@ public:
ConstString &GetObjectName() { return m_object_name; }
const ConstString &GetObjectName() const { return m_object_name; }
ConstString GetObjectName() const { return m_object_name; }
uint64_t GetObjectOffset() const { return m_object_offset; }

View File

@ -43,7 +43,7 @@ public:
//------------------------------------------------------------------
// ABI
//------------------------------------------------------------------
static bool RegisterPlugin(const ConstString &name, const char *description,
static bool RegisterPlugin(ConstString name, const char *description,
ABICreateInstance create_callback);
static bool UnregisterPlugin(ABICreateInstance create_callback);
@ -51,7 +51,7 @@ public:
static ABICreateInstance GetABICreateCallbackAtIndex(uint32_t idx);
static ABICreateInstance
GetABICreateCallbackForPluginName(const ConstString &name);
GetABICreateCallbackForPluginName(ConstString name);
//------------------------------------------------------------------
// Architecture
@ -59,7 +59,7 @@ public:
using ArchitectureCreateInstance =
std::unique_ptr<Architecture> (*)(const ArchSpec &);
static void RegisterPlugin(const ConstString &name,
static void RegisterPlugin(ConstString name,
llvm::StringRef description,
ArchitectureCreateInstance create_callback);
@ -71,7 +71,7 @@ public:
//------------------------------------------------------------------
// Disassembler
//------------------------------------------------------------------
static bool RegisterPlugin(const ConstString &name, const char *description,
static bool RegisterPlugin(ConstString name, const char *description,
DisassemblerCreateInstance create_callback);
static bool UnregisterPlugin(DisassemblerCreateInstance create_callback);
@ -80,13 +80,13 @@ public:
GetDisassemblerCreateCallbackAtIndex(uint32_t idx);
static DisassemblerCreateInstance
GetDisassemblerCreateCallbackForPluginName(const ConstString &name);
GetDisassemblerCreateCallbackForPluginName(ConstString name);
//------------------------------------------------------------------
// DynamicLoader
//------------------------------------------------------------------
static bool
RegisterPlugin(const ConstString &name, const char *description,
RegisterPlugin(ConstString name, const char *description,
DynamicLoaderCreateInstance create_callback,
DebuggerInitializeCallback debugger_init_callback = nullptr);
@ -96,13 +96,13 @@ public:
GetDynamicLoaderCreateCallbackAtIndex(uint32_t idx);
static DynamicLoaderCreateInstance
GetDynamicLoaderCreateCallbackForPluginName(const ConstString &name);
GetDynamicLoaderCreateCallbackForPluginName(ConstString name);
//------------------------------------------------------------------
// JITLoader
//------------------------------------------------------------------
static bool
RegisterPlugin(const ConstString &name, const char *description,
RegisterPlugin(ConstString name, const char *description,
JITLoaderCreateInstance create_callback,
DebuggerInitializeCallback debugger_init_callback = nullptr);
@ -112,12 +112,12 @@ public:
GetJITLoaderCreateCallbackAtIndex(uint32_t idx);
static JITLoaderCreateInstance
GetJITLoaderCreateCallbackForPluginName(const ConstString &name);
GetJITLoaderCreateCallbackForPluginName(ConstString name);
//------------------------------------------------------------------
// EmulateInstruction
//------------------------------------------------------------------
static bool RegisterPlugin(const ConstString &name, const char *description,
static bool RegisterPlugin(ConstString name, const char *description,
EmulateInstructionCreateInstance create_callback);
static bool
@ -127,12 +127,12 @@ public:
GetEmulateInstructionCreateCallbackAtIndex(uint32_t idx);
static EmulateInstructionCreateInstance
GetEmulateInstructionCreateCallbackForPluginName(const ConstString &name);
GetEmulateInstructionCreateCallbackForPluginName(ConstString name);
//------------------------------------------------------------------
// OperatingSystem
//------------------------------------------------------------------
static bool RegisterPlugin(const ConstString &name, const char *description,
static bool RegisterPlugin(ConstString name, const char *description,
OperatingSystemCreateInstance create_callback,
DebuggerInitializeCallback debugger_init_callback);
@ -142,12 +142,12 @@ public:
GetOperatingSystemCreateCallbackAtIndex(uint32_t idx);
static OperatingSystemCreateInstance
GetOperatingSystemCreateCallbackForPluginName(const ConstString &name);
GetOperatingSystemCreateCallbackForPluginName(ConstString name);
//------------------------------------------------------------------
// Language
//------------------------------------------------------------------
static bool RegisterPlugin(const ConstString &name, const char *description,
static bool RegisterPlugin(ConstString name, const char *description,
LanguageCreateInstance create_callback);
static bool UnregisterPlugin(LanguageCreateInstance create_callback);
@ -155,13 +155,13 @@ public:
static LanguageCreateInstance GetLanguageCreateCallbackAtIndex(uint32_t idx);
static LanguageCreateInstance
GetLanguageCreateCallbackForPluginName(const ConstString &name);
GetLanguageCreateCallbackForPluginName(ConstString name);
//------------------------------------------------------------------
// LanguageRuntime
//------------------------------------------------------------------
static bool
RegisterPlugin(const ConstString &name, const char *description,
RegisterPlugin(ConstString name, const char *description,
LanguageRuntimeCreateInstance create_callback,
LanguageRuntimeGetCommandObject command_callback = nullptr);
@ -174,12 +174,12 @@ public:
GetLanguageRuntimeGetCommandObjectAtIndex(uint32_t idx);
static LanguageRuntimeCreateInstance
GetLanguageRuntimeCreateCallbackForPluginName(const ConstString &name);
GetLanguageRuntimeCreateCallbackForPluginName(ConstString name);
//------------------------------------------------------------------
// SystemRuntime
//------------------------------------------------------------------
static bool RegisterPlugin(const ConstString &name, const char *description,
static bool RegisterPlugin(ConstString name, const char *description,
SystemRuntimeCreateInstance create_callback);
static bool UnregisterPlugin(SystemRuntimeCreateInstance create_callback);
@ -188,13 +188,13 @@ public:
GetSystemRuntimeCreateCallbackAtIndex(uint32_t idx);
static SystemRuntimeCreateInstance
GetSystemRuntimeCreateCallbackForPluginName(const ConstString &name);
GetSystemRuntimeCreateCallbackForPluginName(ConstString name);
//------------------------------------------------------------------
// ObjectFile
//------------------------------------------------------------------
static bool
RegisterPlugin(const ConstString &name, const char *description,
RegisterPlugin(ConstString name, const char *description,
ObjectFileCreateInstance create_callback,
ObjectFileCreateMemoryInstance create_memory_callback,
ObjectFileGetModuleSpecifications get_module_specifications,
@ -212,10 +212,10 @@ public:
GetObjectFileGetModuleSpecificationsCallbackAtIndex(uint32_t idx);
static ObjectFileCreateInstance
GetObjectFileCreateCallbackForPluginName(const ConstString &name);
GetObjectFileCreateCallbackForPluginName(ConstString name);
static ObjectFileCreateMemoryInstance
GetObjectFileCreateMemoryCallbackForPluginName(const ConstString &name);
GetObjectFileCreateMemoryCallbackForPluginName(ConstString name);
static Status SaveCore(const lldb::ProcessSP &process_sp,
const FileSpec &outfile);
@ -224,7 +224,7 @@ public:
// ObjectContainer
//------------------------------------------------------------------
static bool
RegisterPlugin(const ConstString &name, const char *description,
RegisterPlugin(ConstString name, const char *description,
ObjectContainerCreateInstance create_callback,
ObjectFileGetModuleSpecifications get_module_specifications);
@ -234,7 +234,7 @@ public:
GetObjectContainerCreateCallbackAtIndex(uint32_t idx);
static ObjectContainerCreateInstance
GetObjectContainerCreateCallbackForPluginName(const ConstString &name);
GetObjectContainerCreateCallbackForPluginName(ConstString name);
static ObjectFileGetModuleSpecifications
GetObjectContainerGetModuleSpecificationsCallbackAtIndex(uint32_t idx);
@ -243,7 +243,7 @@ public:
// Platform
//------------------------------------------------------------------
static bool
RegisterPlugin(const ConstString &name, const char *description,
RegisterPlugin(ConstString name, const char *description,
PlatformCreateInstance create_callback,
DebuggerInitializeCallback debugger_init_callback = nullptr);
@ -252,7 +252,7 @@ public:
static PlatformCreateInstance GetPlatformCreateCallbackAtIndex(uint32_t idx);
static PlatformCreateInstance
GetPlatformCreateCallbackForPluginName(const ConstString &name);
GetPlatformCreateCallbackForPluginName(ConstString name);
static const char *GetPlatformPluginNameAtIndex(uint32_t idx);
@ -264,7 +264,7 @@ public:
// Process
//------------------------------------------------------------------
static bool
RegisterPlugin(const ConstString &name, const char *description,
RegisterPlugin(ConstString name, const char *description,
ProcessCreateInstance create_callback,
DebuggerInitializeCallback debugger_init_callback = nullptr);
@ -273,7 +273,7 @@ public:
static ProcessCreateInstance GetProcessCreateCallbackAtIndex(uint32_t idx);
static ProcessCreateInstance
GetProcessCreateCallbackForPluginName(const ConstString &name);
GetProcessCreateCallbackForPluginName(ConstString name);
static const char *GetProcessPluginNameAtIndex(uint32_t idx);
@ -282,7 +282,7 @@ public:
//------------------------------------------------------------------
// ScriptInterpreter
//------------------------------------------------------------------
static bool RegisterPlugin(const ConstString &name, const char *description,
static bool RegisterPlugin(ConstString name, const char *description,
lldb::ScriptLanguage script_lang,
ScriptInterpreterCreateInstance create_callback);
@ -334,7 +334,7 @@ public:
/// Returns true upon success; otherwise, false.
//------------------------------------------------------------------
static bool
RegisterPlugin(const ConstString &name, const char *description,
RegisterPlugin(ConstString name, const char *description,
StructuredDataPluginCreateInstance create_callback,
DebuggerInitializeCallback debugger_init_callback = nullptr,
StructuredDataFilterLaunchInfo filter_callback = nullptr);
@ -346,7 +346,7 @@ public:
GetStructuredDataPluginCreateCallbackAtIndex(uint32_t idx);
static StructuredDataPluginCreateInstance
GetStructuredDataPluginCreateCallbackForPluginName(const ConstString &name);
GetStructuredDataPluginCreateCallbackForPluginName(ConstString name);
static StructuredDataFilterLaunchInfo
GetStructuredDataFilterCallbackAtIndex(uint32_t idx,
@ -356,7 +356,7 @@ public:
// SymbolFile
//------------------------------------------------------------------
static bool
RegisterPlugin(const ConstString &name, const char *description,
RegisterPlugin(ConstString name, const char *description,
SymbolFileCreateInstance create_callback,
DebuggerInitializeCallback debugger_init_callback = nullptr);
@ -366,12 +366,12 @@ public:
GetSymbolFileCreateCallbackAtIndex(uint32_t idx);
static SymbolFileCreateInstance
GetSymbolFileCreateCallbackForPluginName(const ConstString &name);
GetSymbolFileCreateCallbackForPluginName(ConstString name);
//------------------------------------------------------------------
// SymbolVendor
//------------------------------------------------------------------
static bool RegisterPlugin(const ConstString &name, const char *description,
static bool RegisterPlugin(ConstString name, const char *description,
SymbolVendorCreateInstance create_callback);
static bool UnregisterPlugin(SymbolVendorCreateInstance create_callback);
@ -380,12 +380,12 @@ public:
GetSymbolVendorCreateCallbackAtIndex(uint32_t idx);
static SymbolVendorCreateInstance
GetSymbolVendorCreateCallbackForPluginName(const ConstString &name);
GetSymbolVendorCreateCallbackForPluginName(ConstString name);
//------------------------------------------------------------------
// UnwindAssembly
//------------------------------------------------------------------
static bool RegisterPlugin(const ConstString &name, const char *description,
static bool RegisterPlugin(ConstString name, const char *description,
UnwindAssemblyCreateInstance create_callback);
static bool UnregisterPlugin(UnwindAssemblyCreateInstance create_callback);
@ -394,12 +394,12 @@ public:
GetUnwindAssemblyCreateCallbackAtIndex(uint32_t idx);
static UnwindAssemblyCreateInstance
GetUnwindAssemblyCreateCallbackForPluginName(const ConstString &name);
GetUnwindAssemblyCreateCallbackForPluginName(ConstString name);
//------------------------------------------------------------------
// MemoryHistory
//------------------------------------------------------------------
static bool RegisterPlugin(const ConstString &name, const char *description,
static bool RegisterPlugin(ConstString name, const char *description,
MemoryHistoryCreateInstance create_callback);
static bool UnregisterPlugin(MemoryHistoryCreateInstance create_callback);
@ -408,13 +408,13 @@ public:
GetMemoryHistoryCreateCallbackAtIndex(uint32_t idx);
static MemoryHistoryCreateInstance
GetMemoryHistoryCreateCallbackForPluginName(const ConstString &name);
GetMemoryHistoryCreateCallbackForPluginName(ConstString name);
//------------------------------------------------------------------
// InstrumentationRuntime
//------------------------------------------------------------------
static bool
RegisterPlugin(const ConstString &name, const char *description,
RegisterPlugin(ConstString name, const char *description,
InstrumentationRuntimeCreateInstance create_callback,
InstrumentationRuntimeGetType get_type_callback);
@ -428,13 +428,13 @@ public:
GetInstrumentationRuntimeCreateCallbackAtIndex(uint32_t idx);
static InstrumentationRuntimeCreateInstance
GetInstrumentationRuntimeCreateCallbackForPluginName(const ConstString &name);
GetInstrumentationRuntimeCreateCallbackForPluginName(ConstString name);
//------------------------------------------------------------------
// TypeSystem
//------------------------------------------------------------------
static bool RegisterPlugin(
const ConstString &name, const char *description,
ConstString name, const char *description,
TypeSystemCreateInstance create_callback,
TypeSystemEnumerateSupportedLanguages enumerate_languages_callback);
@ -444,20 +444,20 @@ public:
GetTypeSystemCreateCallbackAtIndex(uint32_t idx);
static TypeSystemCreateInstance
GetTypeSystemCreateCallbackForPluginName(const ConstString &name);
GetTypeSystemCreateCallbackForPluginName(ConstString name);
static TypeSystemEnumerateSupportedLanguages
GetTypeSystemEnumerateSupportedLanguagesCallbackAtIndex(uint32_t idx);
static TypeSystemEnumerateSupportedLanguages
GetTypeSystemEnumerateSupportedLanguagesCallbackForPluginName(
const ConstString &name);
ConstString name);
//------------------------------------------------------------------
// REPL
//------------------------------------------------------------------
static bool
RegisterPlugin(const ConstString &name, const char *description,
RegisterPlugin(ConstString name, const char *description,
REPLCreateInstance create_callback,
REPLEnumerateSupportedLanguages enumerate_languages_callback);
@ -466,14 +466,14 @@ public:
static REPLCreateInstance GetREPLCreateCallbackAtIndex(uint32_t idx);
static REPLCreateInstance
GetREPLCreateCallbackForPluginName(const ConstString &name);
GetREPLCreateCallbackForPluginName(ConstString name);
static REPLEnumerateSupportedLanguages
GetREPLEnumerateSupportedLanguagesCallbackAtIndex(uint32_t idx);
static REPLEnumerateSupportedLanguages
GetREPLSystemEnumerateSupportedLanguagesCallbackForPluginName(
const ConstString &name);
ConstString name);
//------------------------------------------------------------------
// Some plug-ins might register a DebuggerInitializeCallback callback when
@ -486,59 +486,59 @@ public:
static lldb::OptionValuePropertiesSP
GetSettingForDynamicLoaderPlugin(Debugger &debugger,
const ConstString &setting_name);
ConstString setting_name);
static bool CreateSettingForDynamicLoaderPlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
const ConstString &description, bool is_global_property);
ConstString description, bool is_global_property);
static lldb::OptionValuePropertiesSP
GetSettingForPlatformPlugin(Debugger &debugger,
const ConstString &setting_name);
ConstString setting_name);
static bool CreateSettingForPlatformPlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
const ConstString &description, bool is_global_property);
ConstString description, bool is_global_property);
static lldb::OptionValuePropertiesSP
GetSettingForProcessPlugin(Debugger &debugger,
const ConstString &setting_name);
ConstString setting_name);
static bool CreateSettingForProcessPlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
const ConstString &description, bool is_global_property);
ConstString description, bool is_global_property);
static lldb::OptionValuePropertiesSP
GetSettingForSymbolFilePlugin(Debugger &debugger,
const ConstString &setting_name);
ConstString setting_name);
static bool CreateSettingForSymbolFilePlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
const ConstString &description, bool is_global_property);
ConstString description, bool is_global_property);
static lldb::OptionValuePropertiesSP
GetSettingForJITLoaderPlugin(Debugger &debugger,
const ConstString &setting_name);
ConstString setting_name);
static bool CreateSettingForJITLoaderPlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
const ConstString &description, bool is_global_property);
ConstString description, bool is_global_property);
static lldb::OptionValuePropertiesSP
GetSettingForOperatingSystemPlugin(Debugger &debugger,
const ConstString &setting_name);
ConstString setting_name);
static bool CreateSettingForOperatingSystemPlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
const ConstString &description, bool is_global_property);
ConstString description, bool is_global_property);
static lldb::OptionValuePropertiesSP
GetSettingForStructuredDataPlugin(Debugger &debugger,
const ConstString &setting_name);
ConstString setting_name);
static bool CreateSettingForStructuredDataPlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
const ConstString &description, bool is_global_property);
ConstString description, bool is_global_property);
};
} // namespace lldb_private

View File

@ -33,11 +33,11 @@ public:
/// Use the ItaniumPartialDemangler to obtain rich mangling information from
/// the given mangled name.
bool FromItaniumName(const ConstString &mangled);
bool FromItaniumName(ConstString mangled);
/// Use the legacy language parser implementation to obtain rich mangling
/// information from the given demangled name.
bool FromCxxMethodName(const ConstString &demangled);
bool FromCxxMethodName(ConstString demangled);
/// If this symbol describes a constructor or destructor.
bool IsCtorOrDtor() const;

View File

@ -67,7 +67,7 @@ public:
void Dump(Stream *s, Target *target, bool show_header, uint32_t depth) const;
lldb::SectionSP FindSectionByName(const ConstString &section_dstr) const;
lldb::SectionSP FindSectionByName(ConstString section_dstr) const;
lldb::SectionSP FindSectionByID(lldb::user_id_t sect_id) const;
@ -109,7 +109,7 @@ class Section : public std::enable_shared_from_this<Section>,
public:
// Create a root section (one that has no parent)
Section(const lldb::ModuleSP &module_sp, ObjectFile *obj_file,
lldb::user_id_t sect_id, const ConstString &name,
lldb::user_id_t sect_id, ConstString name,
lldb::SectionType sect_type, lldb::addr_t file_vm_addr,
lldb::addr_t vm_size, lldb::offset_t file_offset,
lldb::offset_t file_size, uint32_t log2align, uint32_t flags,
@ -120,7 +120,7 @@ public:
// sections, non-NULL for
// child sections
const lldb::ModuleSP &module_sp, ObjectFile *obj_file,
lldb::user_id_t sect_id, const ConstString &name,
lldb::user_id_t sect_id, ConstString name,
lldb::SectionType sect_type, lldb::addr_t file_vm_addr,
lldb::addr_t vm_size, lldb::offset_t file_offset,
lldb::offset_t file_size, uint32_t log2align, uint32_t flags,
@ -175,7 +175,7 @@ public:
bool IsDescendant(const Section *section);
const ConstString &GetName() const { return m_name; }
ConstString GetName() const { return m_name; }
bool Slide(lldb::addr_t slide_amount, bool slide_children);

View File

@ -77,7 +77,7 @@ public:
std::vector<const Property *> &matching_properties) const;
lldb::OptionValuePropertiesSP GetSubProperty(const ExecutionContext *exe_ctx,
const ConstString &name);
ConstString name);
// We sometimes need to introduce a setting to enable experimental features,
// but then we don't want the setting for these to cause errors when the

View File

@ -483,7 +483,7 @@ public:
//------------------------------------------------------------------
const Status &GetError();
const ConstString &GetName() const;
ConstString GetName() const;
virtual lldb::ValueObjectSP GetChildAtIndex(size_t idx, bool can_create);
@ -503,10 +503,10 @@ public:
GetChildAtNamePath(llvm::ArrayRef<std::pair<ConstString, bool>> names,
ConstString *name_of_error = nullptr);
virtual lldb::ValueObjectSP GetChildMemberWithName(const ConstString &name,
virtual lldb::ValueObjectSP GetChildMemberWithName(ConstString name,
bool can_create);
virtual size_t GetIndexOfChildWithName(const ConstString &name);
virtual size_t GetIndexOfChildWithName(ConstString name);
size_t GetNumChildren(uint32_t max = UINT32_MAX);
@ -573,14 +573,14 @@ public:
// Change the name of the current ValueObject. Should *not* be used from a
// synthetic child provider as it would change the name of the non synthetic
// child as well.
void SetName(const ConstString &name);
void SetName(ConstString name);
virtual lldb::addr_t GetAddressOf(bool scalar_is_load_address = true,
AddressType *address_type = nullptr);
lldb::addr_t GetPointerValue(AddressType *address_type = nullptr);
lldb::ValueObjectSP GetSyntheticChild(const ConstString &key) const;
lldb::ValueObjectSP GetSyntheticChild(ConstString key) const;
lldb::ValueObjectSP GetSyntheticArrayMember(size_t index, bool can_create);
@ -617,7 +617,7 @@ public:
GetQualifiedRepresentationIfAvailable(lldb::DynamicValueType dynValue,
bool synthValue);
virtual lldb::ValueObjectSP CreateConstantValue(const ConstString &name);
virtual lldb::ValueObjectSP CreateConstantValue(ConstString name);
virtual lldb::ValueObjectSP Dereference(Status &error);
@ -625,7 +625,7 @@ public:
// ValueObject as its parent. It should be used when we want to change the
// name of a ValueObject without modifying the actual ValueObject itself
// (e.g. sythetic child provider).
virtual lldb::ValueObjectSP Clone(const ConstString &new_name);
virtual lldb::ValueObjectSP Clone(ConstString new_name);
virtual lldb::ValueObjectSP AddressOf(Status &error);
@ -999,7 +999,7 @@ protected:
void ClearUserVisibleData(
uint32_t items = ValueObject::eClearUserVisibleDataItemsAllStrings);
void AddSyntheticChild(const ConstString &key, ValueObject *valobj);
void AddSyntheticChild(ConstString key, ValueObject *valobj);
DataExtractor &GetDataExtractor();

View File

@ -32,7 +32,7 @@ public:
~ValueObjectCast() override;
static lldb::ValueObjectSP Create(ValueObject &parent,
const ConstString &name,
ConstString name,
const CompilerType &cast_type);
uint64_t GetByteSize() override;
@ -52,7 +52,7 @@ public:
}
protected:
ValueObjectCast(ValueObject &parent, const ConstString &name,
ValueObjectCast(ValueObject &parent, ConstString name,
const CompilerType &cast_type);
bool UpdateValue() override;

View File

@ -83,7 +83,7 @@ protected:
friend class ValueObjectConstResultImpl;
ValueObjectChild(ValueObject &parent, const CompilerType &compiler_type,
const ConstString &name, uint64_t byte_size,
ConstString name, uint64_t byte_size,
int32_t byte_offset, uint32_t bitfield_bit_size,
uint32_t bitfield_bit_offset, bool is_base_class,
bool is_deref_of_parent,

View File

@ -48,22 +48,22 @@ public:
static lldb::ValueObjectSP
Create(ExecutionContextScope *exe_scope, const CompilerType &compiler_type,
const ConstString &name, const DataExtractor &data,
ConstString name, const DataExtractor &data,
lldb::addr_t address = LLDB_INVALID_ADDRESS);
static lldb::ValueObjectSP
Create(ExecutionContextScope *exe_scope, const CompilerType &compiler_type,
const ConstString &name, const lldb::DataBufferSP &result_data_sp,
ConstString name, const lldb::DataBufferSP &result_data_sp,
lldb::ByteOrder byte_order, uint32_t addr_size,
lldb::addr_t address = LLDB_INVALID_ADDRESS);
static lldb::ValueObjectSP
Create(ExecutionContextScope *exe_scope, const CompilerType &compiler_type,
const ConstString &name, lldb::addr_t address,
ConstString name, lldb::addr_t address,
AddressType address_type, uint32_t addr_byte_size);
static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope,
Value &value, const ConstString &name,
Value &value, ConstString name,
Module *module = nullptr);
// When an expression fails to evaluate, we return an error
@ -134,23 +134,23 @@ private:
ValueObjectConstResult(ExecutionContextScope *exe_scope,
const CompilerType &compiler_type,
const ConstString &name, const DataExtractor &data,
ConstString name, const DataExtractor &data,
lldb::addr_t address);
ValueObjectConstResult(ExecutionContextScope *exe_scope,
const CompilerType &compiler_type,
const ConstString &name,
ConstString name,
const lldb::DataBufferSP &result_data_sp,
lldb::ByteOrder byte_order, uint32_t addr_size,
lldb::addr_t address);
ValueObjectConstResult(ExecutionContextScope *exe_scope,
const CompilerType &compiler_type,
const ConstString &name, lldb::addr_t address,
ConstString name, lldb::addr_t address,
AddressType address_type, uint32_t addr_byte_size);
ValueObjectConstResult(ExecutionContextScope *exe_scope, const Value &value,
const ConstString &name, Module *module = nullptr);
ConstString name, Module *module = nullptr);
ValueObjectConstResult(ExecutionContextScope *exe_scope, const Status &error);

View File

@ -34,7 +34,7 @@ namespace lldb_private {
class ValueObjectConstResultCast : public ValueObjectCast {
public:
ValueObjectConstResultCast(ValueObject &parent, const ConstString &name,
ValueObjectConstResultCast(ValueObject &parent, ConstString name,
const CompilerType &cast_type,
lldb::addr_t live_address = LLDB_INVALID_ADDRESS);

View File

@ -38,7 +38,7 @@ class ValueObjectConstResultChild : public ValueObjectChild {
public:
ValueObjectConstResultChild(ValueObject &parent,
const CompilerType &compiler_type,
const ConstString &name, uint32_t byte_size,
ConstString name, uint32_t byte_size,
int32_t byte_offset, uint32_t bitfield_bit_size,
uint32_t bitfield_bit_offset, bool is_base_class,
bool is_deref_of_parent,

View File

@ -103,10 +103,10 @@ public:
ValueObject *CreateChildAtIndex(size_t idx, bool synthetic_array_member,
int32_t synthetic_index) override;
lldb::ValueObjectSP GetChildMemberWithName(const ConstString &name,
lldb::ValueObjectSP GetChildMemberWithName(ConstString name,
bool can_create) override;
size_t GetIndexOfChildWithName(const ConstString &name) override;
size_t GetIndexOfChildWithName(ConstString name) override;
protected:
bool UpdateValue() override;

View File

@ -62,10 +62,10 @@ public:
lldb::ValueObjectSP GetChildAtIndex(size_t idx, bool can_create) override;
lldb::ValueObjectSP GetChildMemberWithName(const ConstString &name,
lldb::ValueObjectSP GetChildMemberWithName(ConstString name,
bool can_create) override;
size_t GetIndexOfChildWithName(const ConstString &name) override;
size_t GetIndexOfChildWithName(ConstString name) override;
lldb::ValueObjectSP
GetDynamicValue(lldb::DynamicValueType valueType) override;

View File

@ -75,13 +75,13 @@ public:
class NamedSummaryFormats {
public:
static bool GetSummaryFormat(const ConstString &type,
static bool GetSummaryFormat(ConstString type,
lldb::TypeSummaryImplSP &entry);
static void Add(const ConstString &type,
static void Add(ConstString type,
const lldb::TypeSummaryImplSP &entry);
static bool Delete(const ConstString &type);
static bool Delete(ConstString type);
static void Clear();
@ -94,27 +94,27 @@ public:
class Categories {
public:
static bool GetCategory(const ConstString &category,
static bool GetCategory(ConstString category,
lldb::TypeCategoryImplSP &entry,
bool allow_create = true);
static bool GetCategory(lldb::LanguageType language,
lldb::TypeCategoryImplSP &entry);
static void Add(const ConstString &category);
static void Add(ConstString category);
static bool Delete(const ConstString &category);
static bool Delete(ConstString category);
static void Clear();
static void Clear(const ConstString &category);
static void Clear(ConstString category);
static void Enable(const ConstString &category,
static void Enable(ConstString category,
TypeCategoryMap::Position = TypeCategoryMap::Default);
static void Enable(lldb::LanguageType lang_type);
static void Disable(const ConstString &category);
static void Disable(ConstString category);
static void Disable(lldb::LanguageType lang_type);

View File

@ -71,29 +71,29 @@ private:
uint64_t m_cache_hits;
uint64_t m_cache_misses;
Entry &GetEntry(const ConstString &type);
Entry &GetEntry(ConstString type);
public:
FormatCache();
bool GetFormat(const ConstString &type, lldb::TypeFormatImplSP &format_sp);
bool GetFormat(ConstString type, lldb::TypeFormatImplSP &format_sp);
bool GetSummary(const ConstString &type, lldb::TypeSummaryImplSP &summary_sp);
bool GetSummary(ConstString type, lldb::TypeSummaryImplSP &summary_sp);
bool GetSynthetic(const ConstString &type,
bool GetSynthetic(ConstString type,
lldb::SyntheticChildrenSP &synthetic_sp);
bool GetValidator(const ConstString &type,
bool GetValidator(ConstString type,
lldb::TypeValidatorImplSP &summary_sp);
void SetFormat(const ConstString &type, lldb::TypeFormatImplSP &format_sp);
void SetFormat(ConstString type, lldb::TypeFormatImplSP &format_sp);
void SetSummary(const ConstString &type, lldb::TypeSummaryImplSP &summary_sp);
void SetSummary(ConstString type, lldb::TypeSummaryImplSP &summary_sp);
void SetSynthetic(const ConstString &type,
void SetSynthetic(ConstString type,
lldb::SyntheticChildrenSP &synthetic_sp);
void SetValidator(const ConstString &type,
void SetValidator(ConstString type,
lldb::TypeValidatorImplSP &synthetic_sp);
void Clear();

View File

@ -50,19 +50,19 @@ public:
}
void
EnableCategory(const ConstString &category_name,
EnableCategory(ConstString category_name,
TypeCategoryMap::Position pos = TypeCategoryMap::Default) {
EnableCategory(category_name, pos,
std::initializer_list<lldb::LanguageType>());
}
void EnableCategory(const ConstString &category_name,
void EnableCategory(ConstString category_name,
TypeCategoryMap::Position pos, lldb::LanguageType lang) {
std::initializer_list<lldb::LanguageType> langs = {lang};
EnableCategory(category_name, pos, langs);
}
void EnableCategory(const ConstString &category_name,
void EnableCategory(ConstString category_name,
TypeCategoryMap::Position pos = TypeCategoryMap::Default,
std::initializer_list<lldb::LanguageType> langs = {}) {
TypeCategoryMap::ValueSP category_sp;
@ -73,7 +73,7 @@ public:
}
}
void DisableCategory(const ConstString &category_name) {
void DisableCategory(ConstString category_name) {
m_categories_map.Disable(category_name);
}
@ -91,7 +91,7 @@ public:
void DisableAllCategories();
bool DeleteCategory(const ConstString &category_name) {
bool DeleteCategory(ConstString category_name) {
return m_categories_map.Delete(category_name);
}
@ -112,7 +112,7 @@ public:
return GetCategory(ConstString(category_name));
}
lldb::TypeCategoryImplSP GetCategory(const ConstString &category_name,
lldb::TypeCategoryImplSP GetCategory(ConstString category_name,
bool can_create = true);
lldb::TypeFormatImplSP
@ -173,7 +173,7 @@ public:
// method looks for the case where the user is adding a
// "class","struct","enum" or "union" Foo and strips the unnecessary
// qualifier
static ConstString GetValidTypeName(const ConstString &type);
static ConstString GetValidTypeName(ConstString type);
// when DataExtractor dumps a vectorOfT, it uses a predefined format for each
// item this method returns it, or eFormatInvalid if vector_format is not a

View File

@ -42,7 +42,7 @@ public:
// match any type because of the way we strip qualifiers from typenames this
// method looks for the case where the user is adding a "class","struct","enum"
// or "union" Foo and strips the unnecessary qualifier
static inline ConstString GetValidTypeName_Impl(const ConstString &type) {
static inline ConstString GetValidTypeName_Impl(ConstString type) {
if (type.IsEmpty())
return type;
@ -238,7 +238,7 @@ protected:
m_format_map.Add(type, entry);
}
void Add_Impl(const ConstString &type, const MapValueType &entry,
void Add_Impl(ConstString type, const MapValueType &entry,
ConstString *dummy) {
m_format_map.Add(GetValidTypeName_Impl(type), entry);
}

View File

@ -47,7 +47,7 @@ public:
virtual lldb::ValueObjectSP GetChildAtIndex(size_t idx) = 0;
virtual size_t GetIndexOfChildWithName(const ConstString &name) = 0;
virtual size_t GetIndexOfChildWithName(ConstString name) = 0;
// this function is assumed to always succeed and it if fails, the front-end
// should know to deal with it in the correct way (most probably, by refusing
@ -110,7 +110,7 @@ public:
lldb::ValueObjectSP GetChildAtIndex(size_t idx) override { return nullptr; }
size_t GetIndexOfChildWithName(const ConstString &name) override {
size_t GetIndexOfChildWithName(ConstString name) override {
return UINT32_MAX;
}
@ -326,7 +326,7 @@ public:
bool MightHaveChildren() override { return filter->GetCount() > 0; }
size_t GetIndexOfChildWithName(const ConstString &name) override;
size_t GetIndexOfChildWithName(ConstString name) override;
typedef std::shared_ptr<SyntheticChildrenFrontEnd> SharedPointer;
@ -424,7 +424,7 @@ public:
bool MightHaveChildren() override;
size_t GetIndexOfChildWithName(const ConstString &name) override;
size_t GetIndexOfChildWithName(ConstString name) override;
lldb::ValueObjectSP GetSyntheticValue() override;

View File

@ -31,7 +31,7 @@ public:
bool MightHaveChildren() override;
size_t GetIndexOfChildWithName(const ConstString &name) override;
size_t GetIndexOfChildWithName(ConstString name) override;
private:
ExecutionContextRef m_exe_ctx_ref;

View File

@ -38,7 +38,7 @@ public:
size_t GetByteSize() { return m_frozen_sp->GetByteSize(); }
const ConstString &GetName() { return m_frozen_sp->GetName(); }
ConstString GetName() { return m_frozen_sp->GetName(); }
lldb::ValueObjectSP GetValueObject() { return m_frozen_sp; }
@ -61,7 +61,7 @@ public:
m_frozen_sp->GetValue().SetCompilerType(compiler_type);
}
void SetName(const ConstString &name) { m_frozen_sp->SetName(name); }
void SetName(ConstString name) { m_frozen_sp->SetName(name); }
// this function is used to copy the address-of m_live_sp into m_frozen_sp
// this is necessary because the results of certain cast and pointer-
@ -170,7 +170,7 @@ public:
/// The variable requested, or nullptr if that variable is not in the
/// list.
//----------------------------------------------------------------------
lldb::ExpressionVariableSP GetVariable(const ConstString &name) {
lldb::ExpressionVariableSP GetVariable(ConstString name) {
lldb::ExpressionVariableSP var_sp;
for (size_t index = 0, size = GetSize(); index < size; ++index) {
var_sp = GetVariableAtIndex(index);
@ -230,7 +230,7 @@ public:
virtual lldb::ExpressionVariableSP
CreatePersistentVariable(ExecutionContextScope *exe_scope,
const ConstString &name, const CompilerType &type,
ConstString name, const CompilerType &type,
lldb::ByteOrder byte_order,
uint32_t addr_byte_size) = 0;
@ -244,7 +244,7 @@ public:
virtual void
RemovePersistentVariable(lldb::ExpressionVariableSP variable) = 0;
virtual lldb::addr_t LookupSymbol(const ConstString &name);
virtual lldb::addr_t LookupSymbol(ConstString name);
void RegisterExecutionUnit(lldb::IRExecutionUnitSP &execution_unit_sp);

View File

@ -111,7 +111,7 @@ public:
lldb::ModuleSP GetJITModule();
lldb::addr_t FindSymbol(const ConstString &name);
lldb::addr_t FindSymbol(ConstString name);
void GetStaticInitializers(std::vector<lldb::addr_t> &static_initializers);
@ -240,7 +240,7 @@ private:
struct SearchSpec;
void CollectCandidateCNames(std::vector<SearchSpec> &C_specs,
const ConstString &name);
ConstString name);
void CollectCandidateCPlusPlusNames(std::vector<SearchSpec> &CPP_specs,
const std::vector<SearchSpec> &C_specs,
@ -258,7 +258,7 @@ private:
lldb::addr_t FindInUserDefinedSymbols(const std::vector<SearchSpec> &specs,
const lldb_private::SymbolContext &sc);
void ReportSymbolLookupError(const ConstString &name);
void ReportSymbolLookupError(ConstString name);
class MemoryManager : public llvm::SectionMemoryManager {
public:

View File

@ -50,15 +50,15 @@ public:
m_platform_name.clear();
}
const ConstString &GetSDKRootDirectory() const { return m_sdk_sysroot; }
ConstString GetSDKRootDirectory() const { return m_sdk_sysroot; }
void SetSDKRootDirectory(const ConstString &sdk_root_directory) {
void SetSDKRootDirectory(ConstString sdk_root_directory) {
m_sdk_sysroot = sdk_root_directory;
}
const ConstString &GetSDKBuild() const { return m_sdk_build; }
ConstString GetSDKBuild() const { return m_sdk_build; }
void SetSDKBuild(const ConstString &sdk_build) { m_sdk_build = sdk_build; }
void SetSDKBuild(ConstString sdk_build) { m_sdk_build = sdk_build; }
bool PlatformMatches(const lldb::PlatformSP &platform_sp) const;

View File

@ -57,7 +57,7 @@ public:
size_t GetNumValues() const { return m_values.size(); }
lldb::OptionValueSP GetValueForKey(const ConstString &key) const;
lldb::OptionValueSP GetValueForKey(ConstString key) const;
lldb::OptionValueSP GetSubValue(const ExecutionContext *exe_ctx,
llvm::StringRef name, bool will_modify,
@ -66,11 +66,11 @@ public:
Status SetSubValue(const ExecutionContext *exe_ctx, VarSetOperationType op,
llvm::StringRef name, llvm::StringRef value) override;
bool SetValueForKey(const ConstString &key,
bool SetValueForKey(ConstString key,
const lldb::OptionValueSP &value_sp,
bool can_replace = true);
bool DeleteValueForKey(const ConstString &key);
bool DeleteValueForKey(ConstString key);
size_t GetArgs(Args &args) const;

View File

@ -26,7 +26,7 @@ public:
OptionValueProperties()
: OptionValue(), m_name(), m_properties(), m_name_to_index() {}
OptionValueProperties(const ConstString &name);
OptionValueProperties(ConstString name);
OptionValueProperties(const OptionValueProperties &global_properties);
@ -73,7 +73,7 @@ public:
// collection, "name" can't be a path to a property path that refers to a
// property within a property
//---------------------------------------------------------------------
virtual uint32_t GetPropertyIndex(const ConstString &name) const;
virtual uint32_t GetPropertyIndex(ConstString name) const;
//---------------------------------------------------------------------
// Get a property by exact name exists in this property collection, name can
@ -82,7 +82,7 @@ public:
//---------------------------------------------------------------------
virtual const Property *GetProperty(const ExecutionContext *exe_ctx,
bool will_modify,
const ConstString &name) const;
ConstString name) const;
virtual const Property *GetPropertyAtIndex(const ExecutionContext *exe_ctx,
bool will_modify,
@ -101,7 +101,7 @@ public:
uint32_t idx) const;
virtual lldb::OptionValueSP GetValueForKey(const ExecutionContext *exe_ctx,
const ConstString &key,
ConstString key,
bool value_will_be_modified) const;
lldb::OptionValueSP GetSubValue(const ExecutionContext *exe_ctx,
@ -199,11 +199,11 @@ public:
OptionValueFileSpecList *GetPropertyAtIndexAsOptionValueFileSpecList(
const ExecutionContext *exe_ctx, bool will_modify, uint32_t idx) const;
void AppendProperty(const ConstString &name, const ConstString &desc,
void AppendProperty(ConstString name, ConstString desc,
bool is_global, const lldb::OptionValueSP &value_sp);
lldb::OptionValuePropertiesSP GetSubProperty(const ExecutionContext *exe_ctx,
const ConstString &name);
ConstString name);
void SetValueChangedCallback(uint32_t property_idx,
OptionValueChangedCallback callback,

View File

@ -37,7 +37,7 @@ class Property {
public:
Property(const PropertyDefinition &definition);
Property(const ConstString &name, const ConstString &desc, bool is_global,
Property(ConstString name, ConstString desc, bool is_global,
const lldb::OptionValueSP &value_sp);
llvm::StringRef GetName() const { return m_name.GetStringRef(); }

View File

@ -168,9 +168,9 @@ public:
lldb::BasicType type);
static CompilerType GetBasicType(clang::ASTContext *ast,
const ConstString &name);
ConstString name);
static lldb::BasicType GetBasicTypeEnumeration(const ConstString &name);
static lldb::BasicType GetBasicTypeEnumeration(ConstString name);
CompilerType GetBuiltinTypeForDWARFEncodingAndBitSize(const char *type_name,
uint32_t dw_ate,
@ -211,7 +211,7 @@ public:
template <typename RecordDeclType>
CompilerType
GetTypeForIdentifier(const ConstString &type_name,
GetTypeForIdentifier(ConstString type_name,
clang::DeclContext *decl_context = nullptr) {
CompilerType compiler_type;
@ -243,13 +243,13 @@ public:
}
CompilerType CreateStructForIdentifier(
const ConstString &type_name,
ConstString type_name,
const std::initializer_list<std::pair<const char *, CompilerType>>
&type_fields,
bool packed = false);
CompilerType GetOrCreateStructForIdentifier(
const ConstString &type_name,
ConstString type_name,
const std::initializer_list<std::pair<const char *, CompilerType>>
&type_fields,
bool packed = false);
@ -747,19 +747,19 @@ public:
bool omit_empty_base_classes,
const ExecutionContext *exe_ctx) override;
CompilerType GetBuiltinTypeByName(const ConstString &name) override;
CompilerType GetBuiltinTypeByName(ConstString name) override;
lldb::BasicType
GetBasicTypeEnumeration(lldb::opaque_compiler_type_t type) override;
static lldb::BasicType
GetBasicTypeEnumeration(lldb::opaque_compiler_type_t type,
const ConstString &name);
ConstString name);
void ForEachEnumerator(
lldb::opaque_compiler_type_t type,
std::function<bool(const CompilerType &integer_type,
const ConstString &name,
ConstString name,
const llvm::APSInt &value)> const &callback) override;
uint32_t GetNumFields(lldb::opaque_compiler_type_t type) override;

View File

@ -187,7 +187,7 @@ public:
virtual ~MapCompleter();
virtual void CompleteNamespaceMap(NamespaceMapSP &namespace_map,
const ConstString &name,
ConstString name,
NamespaceMapSP &parent_map) const = 0;
};

View File

@ -302,7 +302,7 @@ public:
lldb::BasicType GetBasicTypeEnumeration() const;
static lldb::BasicType GetBasicTypeEnumeration(const ConstString &name);
static lldb::BasicType GetBasicTypeEnumeration(ConstString name);
//----------------------------------------------------------------------
// If this type is an enumeration, iterate through all of its enumerators
@ -311,7 +311,7 @@ public:
//----------------------------------------------------------------------
void ForEachEnumerator(
std::function<bool(const CompilerType &integer_type,
const ConstString &name,
ConstString name,
const llvm::APSInt &value)> const &callback) const;
uint32_t GetNumFields() const;

View File

@ -49,7 +49,7 @@ public:
/// The number of Decls added to decls; will not exceed
/// max_matches.
//------------------------------------------------------------------
virtual uint32_t FindDecls(const ConstString &name, bool append,
virtual uint32_t FindDecls(ConstString name, bool append,
uint32_t max_matches,
std::vector<clang::NamedDecl *> &decls) = 0;

View File

@ -55,7 +55,7 @@ public:
/// Optional declaration information that describes where the
/// function was declared. This can be NULL.
//------------------------------------------------------------------
FunctionInfo(const ConstString &name, const Declaration *decl_ptr);
FunctionInfo(ConstString name, const Declaration *decl_ptr);
//------------------------------------------------------------------
/// Destructor.
@ -190,7 +190,7 @@ public:
/// Optional calling location declaration information that
/// describes from where this inlined function was called.
//------------------------------------------------------------------
InlineFunctionInfo(const ConstString &name, const Mangled &mangled,
InlineFunctionInfo(ConstString name, const Mangled &mangled,
const Declaration *decl_ptr,
const Declaration *call_decl_ptr);

View File

@ -42,7 +42,7 @@ public:
void Clear();
bool Compare(const ConstString &name, lldb::SymbolType type) const;
bool Compare(ConstString name, lldb::SymbolType type) const;
void Dump(Stream *s, Target *target, uint32_t index) const;
@ -133,7 +133,7 @@ public:
FileSpec GetReExportedSymbolSharedLibrary() const;
void SetReExportedSymbolName(const ConstString &name);
void SetReExportedSymbolName(ConstString name);
bool SetReExportedSymbolSharedLibrary(const FileSpec &fspec);

View File

@ -249,7 +249,7 @@ public:
/// @return
/// The symbol that was found, or \b nullptr if none was found.
//------------------------------------------------------------------
const Symbol *FindBestGlobalDataSymbol(const ConstString &name, Status &error);
const Symbol *FindBestGlobalDataSymbol(ConstString name, Status &error);
void GetDescription(Stream *s, lldb::DescriptionLevel level,
Target *target) const;

View File

@ -178,13 +178,13 @@ public:
virtual void DumpClangAST(Stream &s) {}
virtual uint32_t
FindGlobalVariables(const ConstString &name,
FindGlobalVariables(ConstString name,
const CompilerDeclContext *parent_decl_ctx,
uint32_t max_matches, VariableList &variables);
virtual uint32_t FindGlobalVariables(const RegularExpression &regex,
uint32_t max_matches,
VariableList &variables);
virtual uint32_t FindFunctions(const ConstString &name,
virtual uint32_t FindFunctions(ConstString name,
const CompilerDeclContext *parent_decl_ctx,
lldb::FunctionNameType name_type_mask,
bool include_inlines, bool append,
@ -193,7 +193,7 @@ public:
bool include_inlines, bool append,
SymbolContextList &sc_list);
virtual uint32_t
FindTypes(const ConstString &name, const CompilerDeclContext *parent_decl_ctx,
FindTypes(ConstString name, const CompilerDeclContext *parent_decl_ctx,
bool append, uint32_t max_matches,
llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
TypeMap &types);
@ -217,7 +217,7 @@ public:
GetTypeSystemForLanguage(lldb::LanguageType language);
virtual CompilerDeclContext
FindNamespace(const ConstString &name,
FindNamespace(ConstString name,
const CompilerDeclContext *parent_decl_ctx) {
return CompilerDeclContext();
}

View File

@ -80,7 +80,7 @@ public:
lldb::SymbolContextItem resolve_scope,
SymbolContextList &sc_list);
virtual size_t FindGlobalVariables(const ConstString &name,
virtual size_t FindGlobalVariables(ConstString name,
const CompilerDeclContext *parent_decl_ctx,
size_t max_matches,
VariableList &variables);
@ -89,7 +89,7 @@ public:
size_t max_matches,
VariableList &variables);
virtual size_t FindFunctions(const ConstString &name,
virtual size_t FindFunctions(ConstString name,
const CompilerDeclContext *parent_decl_ctx,
lldb::FunctionNameType name_type_mask,
bool include_inlines, bool append,
@ -100,7 +100,7 @@ public:
SymbolContextList &sc_list);
virtual size_t
FindTypes(const ConstString &name, const CompilerDeclContext *parent_decl_ctx,
FindTypes(ConstString name, const CompilerDeclContext *parent_decl_ctx,
bool append, size_t max_matches,
llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
TypeMap &types);
@ -109,7 +109,7 @@ public:
bool append, TypeMap &types);
virtual CompilerDeclContext
FindNamespace(const ConstString &name,
FindNamespace(ConstString name,
const CompilerDeclContext *parent_decl_ctx);
virtual size_t GetNumCompileUnits();

View File

@ -76,16 +76,16 @@ public:
std::vector<uint32_t> &matches,
uint32_t start_idx = 0,
uint32_t end_index = UINT32_MAX) const;
uint32_t AppendSymbolIndexesWithName(const ConstString &symbol_name,
uint32_t AppendSymbolIndexesWithName(ConstString symbol_name,
std::vector<uint32_t> &matches);
uint32_t AppendSymbolIndexesWithName(const ConstString &symbol_name,
uint32_t AppendSymbolIndexesWithName(ConstString symbol_name,
Debug symbol_debug_type,
Visibility symbol_visibility,
std::vector<uint32_t> &matches);
uint32_t AppendSymbolIndexesWithNameAndType(const ConstString &symbol_name,
uint32_t AppendSymbolIndexesWithNameAndType(ConstString symbol_name,
lldb::SymbolType symbol_type,
std::vector<uint32_t> &matches);
uint32_t AppendSymbolIndexesWithNameAndType(const ConstString &symbol_name,
uint32_t AppendSymbolIndexesWithNameAndType(ConstString symbol_name,
lldb::SymbolType symbol_type,
Debug symbol_debug_type,
Visibility symbol_visibility,
@ -98,10 +98,10 @@ public:
const RegularExpression &regex, lldb::SymbolType symbol_type,
Debug symbol_debug_type, Visibility symbol_visibility,
std::vector<uint32_t> &indexes);
size_t FindAllSymbolsWithNameAndType(const ConstString &name,
size_t FindAllSymbolsWithNameAndType(ConstString name,
lldb::SymbolType symbol_type,
std::vector<uint32_t> &symbol_indexes);
size_t FindAllSymbolsWithNameAndType(const ConstString &name,
size_t FindAllSymbolsWithNameAndType(ConstString name,
lldb::SymbolType symbol_type,
Debug symbol_debug_type,
Visibility symbol_visibility,
@ -110,7 +110,7 @@ public:
const RegularExpression &regex, lldb::SymbolType symbol_type,
Debug symbol_debug_type, Visibility symbol_visibility,
std::vector<uint32_t> &symbol_indexes);
Symbol *FindFirstSymbolWithNameAndType(const ConstString &name,
Symbol *FindFirstSymbolWithNameAndType(ConstString name,
lldb::SymbolType symbol_type,
Debug symbol_debug_type,
Visibility symbol_visibility);
@ -118,7 +118,7 @@ public:
Symbol *FindSymbolContainingFileAddress(lldb::addr_t file_addr);
void ForEachSymbolContainingFileAddress(
lldb::addr_t file_addr, std::function<bool(Symbol *)> const &callback);
size_t FindFunctionSymbols(const ConstString &name, uint32_t name_type_mask,
size_t FindFunctionSymbols(ConstString name, uint32_t name_type_mask,
SymbolContextList &sc_list);
void CalculateSymbolSizes();

View File

@ -27,7 +27,7 @@ namespace lldb_private {
// detailed lookups in SymbolVendor and SymbolFile functions.
//----------------------------------------------------------------------
struct CompilerContext {
CompilerContext(CompilerContextKind t, const ConstString &n)
CompilerContext(CompilerContextKind t, ConstString n)
: type(t), name(n) {}
bool operator==(const CompilerContext &rhs) const {
@ -94,7 +94,7 @@ public:
eResolveStateFull = 3
} ResolveState;
Type(lldb::user_id_t uid, SymbolFile *symbol_file, const ConstString &name,
Type(lldb::user_id_t uid, SymbolFile *symbol_file, ConstString name,
llvm::Optional<uint64_t> byte_size, SymbolContextScope *context,
lldb::user_id_t encoding_uid, EncodingDataType encoding_uid_type,
const Declaration &decl, const CompilerType &compiler_qual_type,
@ -125,7 +125,7 @@ public:
TypeList *GetTypeList();
const ConstString &GetName();
ConstString GetName();
llvm::Optional<uint64_t> GetByteSize();
@ -139,7 +139,7 @@ public:
lldb::TypeSP GetTypedefType();
const ConstString &GetName() const { return m_name; }
ConstString GetName() const { return m_name; }
ConstString GetQualifiedName();
@ -478,7 +478,7 @@ public:
{}
TypeMemberImpl(const lldb::TypeImplSP &type_impl_sp, uint64_t bit_offset,
const ConstString &name, uint32_t bitfield_bit_size = 0,
ConstString name, uint32_t bitfield_bit_size = 0,
bool is_bitfield = false)
: m_type_impl_sp(type_impl_sp), m_bit_offset(bit_offset), m_name(name),
m_bitfield_bit_size(bitfield_bit_size), m_is_bitfield(is_bitfield) {}
@ -492,7 +492,7 @@ public:
const lldb::TypeImplSP &GetTypeImpl() { return m_type_impl_sp; }
const ConstString &GetName() const { return m_name; }
ConstString GetName() const { return m_name; }
uint64_t GetBitOffset() const { return m_bit_offset; }
@ -545,7 +545,7 @@ public:
CompilerType GetCompilerType() const { return m_type_pair.GetCompilerType(); }
void SetName(const ConstString &type_name);
void SetName(ConstString type_name);
void SetName(const char *type_name_cstr);
@ -617,7 +617,7 @@ public:
: m_integer_type_sp(), m_name("<invalid>"), m_value(), m_valid(false) {}
TypeEnumMemberImpl(const lldb::TypeImplSP &integer_type_sp,
const ConstString &name, const llvm::APSInt &value);
ConstString name, const llvm::APSInt &value);
TypeEnumMemberImpl(const TypeEnumMemberImpl &rhs)
: m_integer_type_sp(rhs.m_integer_type_sp), m_name(rhs.m_name),
@ -627,7 +627,7 @@ public:
bool IsValid() { return m_valid; }
const ConstString &GetName() const { return m_name; }
ConstString GetName() const { return m_name; }
const lldb::TypeImplSP &GetIntegerType() const { return m_integer_type_sp; }

View File

@ -33,7 +33,7 @@ public:
// lldb::TypeSP
// FindType(lldb::user_id_t uid);
TypeList FindTypes(const ConstString &name);
TypeList FindTypes(ConstString name);
void Insert(const lldb::TypeSP &type);

View File

@ -30,7 +30,7 @@ public:
void Dump(Stream *s, bool show_context);
TypeMap FindTypes(const ConstString &name);
TypeMap FindTypes(ConstString name);
void Insert(const lldb::TypeSP &type);

View File

@ -283,7 +283,7 @@ public:
bool omit_empty_base_classes,
const ExecutionContext *exe_ctx) = 0;
virtual CompilerType GetBuiltinTypeByName(const ConstString &name);
virtual CompilerType GetBuiltinTypeByName(ConstString name);
virtual lldb::BasicType
GetBasicTypeEnumeration(lldb::opaque_compiler_type_t type) = 0;
@ -291,7 +291,7 @@ public:
virtual void ForEachEnumerator(
lldb::opaque_compiler_type_t type,
std::function<bool(const CompilerType &integer_type,
const ConstString &name,
ConstString name,
const llvm::APSInt &value)> const &callback) {}
virtual uint32_t GetNumFields(lldb::opaque_compiler_type_t type) = 0;

View File

@ -57,7 +57,7 @@ public:
// namespace)::i", this function will allow a generic match function that can
// be called by commands and expression parsers to make sure we match
// anything we come across.
bool NameMatches(const ConstString &name) const;
bool NameMatches(ConstString name) const;
bool NameMatches(const RegularExpression &regex) const;

View File

@ -38,10 +38,10 @@ public:
lldb::VariableSP RemoveVariableAtIndex(size_t idx);
lldb::VariableSP FindVariable(const ConstString &name,
lldb::VariableSP FindVariable(ConstString name,
bool include_static_members = true);
lldb::VariableSP FindVariable(const ConstString &name,
lldb::VariableSP FindVariable(ConstString name,
lldb::ValueType value_type,
bool include_static_members = true);

View File

@ -128,7 +128,7 @@ public:
virtual const RegisterInfo *GetRegisterInfoArray(uint32_t &count) = 0;
bool GetRegisterInfoByName(const ConstString &name, RegisterInfo &info);
bool GetRegisterInfoByName(ConstString name, RegisterInfo &info);
bool GetRegisterInfoByKind(lldb::RegisterKind reg_kind, uint32_t reg_num,
RegisterInfo &info);

View File

@ -44,7 +44,7 @@ public:
OptionalBool GetMapped() const { return m_mapped; }
const ConstString &GetName() const { return m_name; }
ConstString GetName() const { return m_name; }
void SetReadable(OptionalBool val) { m_read = val; }

View File

@ -200,7 +200,7 @@ public:
ClassDescriptorSP GetNonKVOClassDescriptor(ValueObject &in_value);
virtual ClassDescriptorSP
GetClassDescriptorFromClassName(const ConstString &class_name);
GetClassDescriptorFromClassName(ConstString class_name);
virtual ClassDescriptorSP GetClassDescriptorFromISA(ObjCISA isa);
@ -253,7 +253,7 @@ public:
}
}
virtual ObjCISA GetISA(const ConstString &name);
virtual ObjCISA GetISA(ConstString name);
virtual ConstString GetActualTypeName(ObjCISA isa);
@ -270,7 +270,7 @@ public:
// Given the name of an Objective-C runtime symbol (e.g., ivar offset
// symbol), try to determine from the runtime what the value of that symbol
// would be. Useful when the underlying binary is stripped.
virtual lldb::addr_t LookupRuntimeSymbol(const ConstString &name) {
virtual lldb::addr_t LookupRuntimeSymbol(ConstString name) {
return LLDB_INVALID_ADDRESS;
}
@ -386,12 +386,12 @@ protected:
CompleteClassMap m_complete_class_cache;
struct ConstStringSetHelpers {
size_t operator()(const ConstString &arg) const // for hashing
size_t operator()(ConstString arg) const // for hashing
{
return (size_t)arg.GetCString();
}
bool operator()(const ConstString &arg1,
const ConstString &arg2) const // for equality
bool operator()(ConstString arg1,
ConstString arg2) const // for equality
{
return arg1.operator==(arg2);
}
@ -401,7 +401,7 @@ protected:
CompleteClassSet;
CompleteClassSet m_negative_complete_class_cache;
ISAToDescriptorIterator GetDescriptorIterator(const ConstString &name);
ISAToDescriptorIterator GetDescriptorIterator(ConstString name);
friend class ::CommandObjectObjC_ClassTable_Dump;

View File

@ -34,7 +34,7 @@ public:
const PathMappingList &operator=(const PathMappingList &rhs);
void Append(const ConstString &path, const ConstString &replacement,
void Append(ConstString path, ConstString replacement,
bool notify);
void Append(const PathMappingList &rhs, bool notify);
@ -51,19 +51,19 @@ public:
bool GetPathsAtIndex(uint32_t idx, ConstString &path,
ConstString &new_path) const;
void Insert(const ConstString &path, const ConstString &replacement,
void Insert(ConstString path, ConstString replacement,
uint32_t insert_idx, bool notify);
bool Remove(size_t index, bool notify);
bool Remove(const ConstString &path, bool notify);
bool Remove(ConstString path, bool notify);
bool Replace(const ConstString &path, const ConstString &replacement,
bool Replace(ConstString path, ConstString replacement,
bool notify);
bool Replace(const ConstString &path, const ConstString &replacement,
bool Replace(ConstString path, ConstString replacement,
uint32_t index, bool notify);
bool RemapPath(const ConstString &path, ConstString &new_path) const;
bool RemapPath(ConstString path, ConstString &new_path) const;
//------------------------------------------------------------------
/// Remaps a source file given \a path into \a new_path.
@ -109,7 +109,7 @@ public:
//------------------------------------------------------------------
bool FindFile(const FileSpec &orig_spec, FileSpec &new_spec) const;
uint32_t FindIndexForPath(const ConstString &path) const;
uint32_t FindIndexForPath(ConstString path) const;
uint32_t GetModificationID() const { return m_mod_id; }
@ -119,9 +119,9 @@ protected:
typedef collection::iterator iterator;
typedef collection::const_iterator const_iterator;
iterator FindIteratorForPath(const ConstString &path);
iterator FindIteratorForPath(ConstString path);
const_iterator FindIteratorForPath(const ConstString &path) const;
const_iterator FindIteratorForPath(ConstString path) const;
collection m_pairs;
ChangedCallback m_callback;

View File

@ -108,9 +108,9 @@ public:
static void SetHostPlatform(const lldb::PlatformSP &platform_sp);
// Find an existing platform plug-in by name
static lldb::PlatformSP Find(const ConstString &name);
static lldb::PlatformSP Find(ConstString name);
static lldb::PlatformSP Create(const ConstString &name, Status &error);
static lldb::PlatformSP Create(ConstString name, Status &error);
static lldb::PlatformSP Create(const ArchSpec &arch,
ArchSpec *platform_arch_ptr, Status &error);
@ -137,7 +137,7 @@ public:
/// should be used. If nullptr, pick the best plug-in.
//------------------------------------------------------------------
// static lldb::PlatformSP
// FindPlugin (Process *process, const ConstString &plugin_name);
// FindPlugin (Process *process, ConstString plugin_name);
//------------------------------------------------------------------
/// Set the target's executable based off of the existing architecture
@ -518,13 +518,13 @@ public:
// Used for column widths
size_t GetMaxGroupIDNameLength() const { return m_max_gid_name_len; }
const ConstString &GetSDKRootDirectory() const { return m_sdk_sysroot; }
ConstString GetSDKRootDirectory() const { return m_sdk_sysroot; }
void SetSDKRootDirectory(const ConstString &dir) { m_sdk_sysroot = dir; }
void SetSDKRootDirectory(ConstString dir) { m_sdk_sysroot = dir; }
const ConstString &GetSDKBuild() const { return m_sdk_build; }
ConstString GetSDKBuild() const { return m_sdk_build; }
void SetSDKBuild(const ConstString &sdk_build) { m_sdk_build = sdk_build; }
void SetSDKBuild(ConstString sdk_build) { m_sdk_build = sdk_build; }
// Override this to return true if your platform supports Clang modules. You
// may also need to override AddClangModuleCompilationOptions to pass the

View File

@ -449,9 +449,9 @@ public:
~ProcessEventData() override;
static const ConstString &GetFlavorString();
static ConstString GetFlavorString();
const ConstString &GetFlavor() const override;
ConstString GetFlavor() const override;
lldb::ProcessSP GetProcessSP() const { return m_process_wp.lock(); }
@ -2596,7 +2596,7 @@ public:
/// Returns the result of attempting to configure the feature.
//------------------------------------------------------------------
virtual Status
ConfigureStructuredData(const ConstString &type_name,
ConfigureStructuredData(ConstString type_name,
const StructuredData::ObjectSP &config_sp);
//------------------------------------------------------------------
@ -2630,7 +2630,7 @@ public:
/// otherwise, returns an empty shared pointer.
//------------------------------------------------------------------
lldb::StructuredDataPluginSP
GetStructuredDataPlugin(const ConstString &type_name) const;
GetStructuredDataPlugin(ConstString type_name) const;
//------------------------------------------------------------------
/// Starts tracing with the configuration provided in options. To enable
@ -2845,7 +2845,7 @@ protected:
///
/// virtual void
/// HandleArrivalOfStructuredData(Process &process,
/// const ConstString &type_name,
/// ConstString type_name,
/// const StructuredData::ObjectSP
/// &object_sp)
///

View File

@ -100,8 +100,8 @@ private:
class StackFrameRecognizerManager {
public:
static void AddRecognizer(lldb::StackFrameRecognizerSP recognizer,
const ConstString &module,
const ConstString &symbol,
ConstString module,
ConstString symbol,
bool first_instruction_only = true);
static void AddRecognizer(lldb::StackFrameRecognizerSP recognizer,

View File

@ -70,7 +70,7 @@ public:
/// @return
/// true if the plugin supports the feature; otherwise, false.
// -------------------------------------------------------------------------
virtual bool SupportsStructuredDataType(const ConstString &type_name) = 0;
virtual bool SupportsStructuredDataType(ConstString type_name) = 0;
// -------------------------------------------------------------------------
/// Handle the arrival of asynchronous structured data from the process.
@ -100,7 +100,7 @@ public:
/// structured data type name.
// -------------------------------------------------------------------------
virtual void
HandleArrivalOfStructuredData(Process &process, const ConstString &type_name,
HandleArrivalOfStructuredData(Process &process, ConstString type_name,
const StructuredData::ObjectSP &object_sp) = 0;
// -------------------------------------------------------------------------
@ -136,7 +136,7 @@ public:
/// The name of the feature tag for the asynchronous structured data.
/// This is needed for plugins that support more than one feature.
// -------------------------------------------------------------------------
virtual bool GetEnabled(const ConstString &type_name) const;
virtual bool GetEnabled(ConstString type_name) const;
// -------------------------------------------------------------------------
/// Allow the plugin to do work related to modules that loaded in the

View File

@ -462,9 +462,9 @@ public:
~TargetEventData() override;
static const ConstString &GetFlavorString();
static ConstString GetFlavorString();
const ConstString &GetFlavor() const override {
ConstString GetFlavor() const override {
return TargetEventData::GetFlavorString();
}
@ -680,12 +680,12 @@ public:
Status &error);
void RemoveNameFromBreakpoint(lldb::BreakpointSP &bp_sp,
const ConstString &name);
ConstString name);
BreakpointName *FindBreakpointName(const ConstString &name, bool can_create,
BreakpointName *FindBreakpointName(ConstString name, bool can_create,
Status &error);
void DeleteBreakpointName(const ConstString &name);
void DeleteBreakpointName(ConstString name);
void ConfigureBreakpointName(BreakpointName &bp_name,
const BreakpointOptions &options,
@ -1111,14 +1111,14 @@ public:
std::string *fixed_expression = nullptr,
ValueObject *ctx_obj = nullptr);
lldb::ExpressionVariableSP GetPersistentVariable(const ConstString &name);
lldb::ExpressionVariableSP GetPersistentVariable(ConstString name);
/// Return the next available number for numbered persistent variables.
unsigned GetNextPersistentVariableIndex() {
return m_next_persistent_variable_index++;
}
lldb::addr_t GetPersistentSymbol(const ConstString &name);
lldb::addr_t GetPersistentSymbol(ConstString name);
//------------------------------------------------------------------
// Target Stop Hooks

View File

@ -91,9 +91,9 @@ public:
~ThreadEventData() override;
static const ConstString &GetFlavorString();
static ConstString GetFlavorString();
const ConstString &GetFlavor() const override {
ConstString GetFlavor() const override {
return ThreadEventData::GetFlavorString();
}

View File

@ -351,7 +351,7 @@ public:
/// @return A ConstString ref containing the distribution id,
/// potentially empty.
//------------------------------------------------------------------
const ConstString &GetDistributionId() const;
ConstString GetDistributionId() const;
//------------------------------------------------------------------
/// Set the distribution id of the architecture.

View File

@ -47,14 +47,14 @@ namespace lldb_private {
//----------------------------------------------------------------------
class BroadcastEventSpec {
public:
BroadcastEventSpec(const ConstString &broadcaster_class, uint32_t event_bits)
BroadcastEventSpec(ConstString broadcaster_class, uint32_t event_bits)
: m_broadcaster_class(broadcaster_class), m_event_bits(event_bits) {}
BroadcastEventSpec(const BroadcastEventSpec &rhs);
~BroadcastEventSpec() = default;
const ConstString &GetBroadcasterClass() const { return m_broadcaster_class; }
ConstString GetBroadcasterClass() const { return m_broadcaster_class; }
uint32_t GetEventBits() const { return m_event_bits; }
@ -128,7 +128,7 @@ private:
class BroadcasterClassMatches {
public:
BroadcasterClassMatches(const ConstString &broadcaster_class)
BroadcasterClassMatches(ConstString broadcaster_class)
: m_broadcaster_class(broadcaster_class) {}
~BroadcasterClassMatches() = default;
@ -351,7 +351,7 @@ public:
/// @return
/// The NULL terminated C string name of this Broadcaster.
//------------------------------------------------------------------
const ConstString &GetBroadcasterName() { return m_broadcaster_name; }
ConstString GetBroadcasterName() { return m_broadcaster_name; }
//------------------------------------------------------------------
/// Get the event name(s) for one or more event bits.

View File

@ -151,7 +151,7 @@ public:
/// @return
/// A const reference to this object.
//------------------------------------------------------------------
const ConstString &operator=(const ConstString &rhs) {
ConstString operator=(ConstString rhs) {
m_string = rhs.m_string;
return *this;
}
@ -170,7 +170,7 @@ public:
/// @li \b true if this object is equal to \a rhs.
/// @li \b false if this object is not equal to \a rhs.
//------------------------------------------------------------------
bool operator==(const ConstString &rhs) const {
bool operator==(ConstString rhs) const {
// We can do a pointer compare to compare these strings since they must
// come from the same pool in order to be equal.
return m_string == rhs.m_string;
@ -190,11 +190,11 @@ public:
/// @li \b true if this object is not equal to \a rhs.
/// @li \b false if this object is equal to \a rhs.
//------------------------------------------------------------------
bool operator!=(const ConstString &rhs) const {
bool operator!=(ConstString rhs) const {
return m_string != rhs.m_string;
}
bool operator<(const ConstString &rhs) const;
bool operator<(ConstString rhs) const;
//------------------------------------------------------------------
/// Get the string value as a C string.
@ -279,7 +279,7 @@ public:
/// @li \b true if this object is equal to \a rhs.
/// @li \b false if this object is not equal to \a rhs.
//------------------------------------------------------------------
static bool Equals(const ConstString &lhs, const ConstString &rhs,
static bool Equals(ConstString lhs, ConstString rhs,
const bool case_sensitive = true);
//------------------------------------------------------------------
@ -308,7 +308,7 @@ public:
/// @li 0 if lhs == rhs
/// @li 1 if lhs > rhs
//------------------------------------------------------------------
static int Compare(const ConstString &lhs, const ConstString &rhs,
static int Compare(ConstString lhs, ConstString rhs,
const bool case_sensitive = true);
//------------------------------------------------------------------
@ -388,7 +388,7 @@ public:
/// soon to be uniqued version of \a demangled.
//------------------------------------------------------------------
void SetStringWithMangledCounterpart(llvm::StringRef demangled,
const ConstString &mangled);
ConstString mangled);
//------------------------------------------------------------------
/// Retrieve the mangled or demangled counterpart for a mangled or demangled
@ -475,7 +475,7 @@ protected:
//------------------------------------------------------------------
/// Stream the string value \a str to the stream \a s
//------------------------------------------------------------------
Stream &operator<<(Stream &s, const ConstString &str);
Stream &operator<<(Stream &s, ConstString str);
} // namespace lldb_private

View File

@ -45,7 +45,7 @@ public:
virtual ~EventData();
virtual const ConstString &GetFlavor() const = 0;
virtual ConstString GetFlavor() const = 0;
virtual void Dump(Stream *s) const;
@ -76,7 +76,7 @@ public:
//------------------------------------------------------------------
// Member functions
//------------------------------------------------------------------
const ConstString &GetFlavor() const override;
ConstString GetFlavor() const override;
void Dump(Stream *s) const override;
@ -99,7 +99,7 @@ public:
static size_t GetByteSizeFromEvent(const Event *event_ptr);
static const ConstString &GetFlavorString();
static ConstString GetFlavorString();
private:
std::string m_bytes;
@ -113,12 +113,12 @@ public:
~EventDataReceipt() override {}
static const ConstString &GetFlavorString() {
static ConstString GetFlavorString() {
static ConstString g_flavor("Process::ProcessEventData");
return g_flavor;
}
const ConstString &GetFlavor() const override { return GetFlavorString(); }
ConstString GetFlavor() const override { return GetFlavorString(); }
bool WaitForEventReceived(const Timeout<std::micro> &timeout = llvm::None) {
return m_predicate.WaitForValueEqualTo(true, timeout);
@ -153,7 +153,7 @@ public:
//------------------------------------------------------------------
// Member functions
//------------------------------------------------------------------
const ConstString &GetFlavor() const override;
ConstString GetFlavor() const override;
void Dump(Stream *s) const override;
@ -182,7 +182,7 @@ public:
static lldb::StructuredDataPluginSP
GetPluginFromEvent(const Event *event_ptr);
static const ConstString &GetFlavorString();
static ConstString GetFlavorString();
private:
lldb::ProcessSP m_process_sp;

View File

@ -286,7 +286,7 @@ public:
/// @return
/// A const reference to the directory string object.
//------------------------------------------------------------------
const ConstString &GetDirectory() const;
ConstString GetDirectory() const;
//------------------------------------------------------------------
/// Filename string get accessor.
@ -302,7 +302,7 @@ public:
/// @return
/// A const reference to the filename string object.
//------------------------------------------------------------------
const ConstString &GetFilename() const;
ConstString GetFilename() const;
//------------------------------------------------------------------
/// Returns true if the filespec represents an implementation source file

View File

@ -115,7 +115,8 @@ public:
llvm::ArrayRef<const char *> categories,
llvm::raw_ostream &error_stream);
static bool ListChannelCategories(llvm::StringRef channel, llvm::raw_ostream &stream);
static bool ListChannelCategories(llvm::StringRef channel,
llvm::raw_ostream &stream);
static void DisableAllLogChannels();

View File

@ -434,7 +434,7 @@ SBTypeEnumMemberList SBType::GetEnumMembers() {
if (this_type.IsValid()) {
this_type.ForEachEnumerator([&sb_enum_member_list](
const CompilerType &integer_type,
const ConstString &name,
ConstString name,
const llvm::APSInt &value) -> bool {
SBTypeEnumMember enum_member(
lldb::TypeEnumMemberImplSP(new TypeEnumMemberImpl(

View File

@ -35,7 +35,7 @@ using namespace lldb;
using namespace lldb_private;
using namespace llvm;
const ConstString &Breakpoint::GetEventIdentifier() {
ConstString Breakpoint::GetEventIdentifier() {
static ConstString g_identifier("event-identifier.breakpoint.changed");
return g_identifier;
}
@ -972,7 +972,7 @@ void Breakpoint::GetResolverDescription(Stream *s) {
m_resolver_sp->GetDescription(s);
}
bool Breakpoint::GetMatchingFileLine(const ConstString &filename,
bool Breakpoint::GetMatchingFileLine(ConstString filename,
uint32_t line_number,
BreakpointLocationCollection &loc_coll) {
// TODO: To be correct, this method needs to fill the breakpoint location
@ -1048,12 +1048,12 @@ Breakpoint::BreakpointEventData::BreakpointEventData(
Breakpoint::BreakpointEventData::~BreakpointEventData() = default;
const ConstString &Breakpoint::BreakpointEventData::GetFlavorString() {
ConstString Breakpoint::BreakpointEventData::GetFlavorString() {
static ConstString g_flavor("Breakpoint::BreakpointEventData");
return g_flavor;
}
const ConstString &Breakpoint::BreakpointEventData::GetFlavor() const {
ConstString Breakpoint::BreakpointEventData::GetFlavor() const {
return BreakpointEventData::GetFlavorString();
}

View File

@ -28,7 +28,7 @@ const Flags::ValueType BreakpointName::Permissions::permissions_mask
(0x5u)
};
BreakpointName::BreakpointName(const ConstString &name, const Breakpoint &bkpt,
BreakpointName::BreakpointName(ConstString name, const Breakpoint &bkpt,
const char *help) :
m_name(name), m_options(bkpt.GetOptions())
{

View File

@ -217,7 +217,7 @@ StructuredData::ObjectSP BreakpointResolverName::SerializeToStructuredData() {
return WrapOptionsDict(options_dict_sp);
}
void BreakpointResolverName::AddNameLookup(const ConstString &name,
void BreakpointResolverName::AddNameLookup(ConstString name,
FunctionNameType name_type_mask) {
ObjCLanguage::MethodName objc_method(name.GetCString(), false);
if (objc_method.IsValid(false)) {

View File

@ -325,12 +325,12 @@ Watchpoint::WatchpointEventData::WatchpointEventData(
Watchpoint::WatchpointEventData::~WatchpointEventData() = default;
const ConstString &Watchpoint::WatchpointEventData::GetFlavorString() {
ConstString Watchpoint::WatchpointEventData::GetFlavorString() {
static ConstString g_flavor("Watchpoint::WatchpointEventData");
return g_flavor;
}
const ConstString &Watchpoint::WatchpointEventData::GetFlavor() const {
ConstString Watchpoint::WatchpointEventData::GetFlavor() const {
return WatchpointEventData::GetFlavorString();
}

View File

@ -194,7 +194,7 @@ protected:
continue;
// Print a new header if the module changed.
const ConstString &module_file_name =
ConstString module_file_name =
module->GetFileSpec().GetFilename();
assert(module_file_name);
if (module_file_name != last_module_file_name) {
@ -240,8 +240,8 @@ protected:
// Dump all matching lines at or above start_line for the file in the
// CU.
const ConstString &file_spec_name = file_spec.GetFilename();
const ConstString &module_file_name =
ConstString file_spec_name = file_spec.GetFilename();
ConstString module_file_name =
module->GetFileSpec().GetFilename();
bool cu_header_printed = false;
uint32_t line = start_line;
@ -780,7 +780,7 @@ protected:
ConstString function;
LineEntry line_entry;
SourceInfo(const ConstString &name, const LineEntry &line_entry)
SourceInfo(ConstString name, const LineEntry &line_entry)
: function(name), line_entry(line_entry) {}
SourceInfo() : function(), line_entry() {}
@ -901,7 +901,7 @@ protected:
// these somewhere, there should probably be a module-filter-list that can be
// passed to the various ModuleList::Find* calls, which would either be a
// vector of string names or a ModuleSpecList.
size_t FindMatchingFunctions(Target *target, const ConstString &name,
size_t FindMatchingFunctions(Target *target, ConstString name,
SymbolContextList &sc_list) {
// Displaying the source for a symbol:
bool include_inlines = true;
@ -934,7 +934,7 @@ protected:
return num_matches;
}
size_t FindMatchingFunctionSymbols(Target *target, const ConstString &name,
size_t FindMatchingFunctionSymbols(Target *target, ConstString name,
SymbolContextList &sc_list) {
size_t num_matches = 0;
const size_t num_modules = m_options.modules.size();

View File

@ -52,7 +52,7 @@ public:
std::string m_category;
ScriptAddOptions(const TypeSummaryImpl::Flags &flags, bool regx,
const ConstString &name, std::string catg)
ConstString name, std::string catg)
: m_flags(flags), m_regex(regx), m_name(name), m_category(catg) {}
typedef std::shared_ptr<ScriptAddOptions> SharedPointer;

View File

@ -711,7 +711,7 @@ void Debugger::Destroy(DebuggerSP &debugger_sp) {
}
DebuggerSP
Debugger::FindDebuggerWithInstanceName(const ConstString &instance_name) {
Debugger::FindDebuggerWithInstanceName(ConstString instance_name) {
DebuggerSP debugger_sp;
if (g_debugger_list_ptr && g_debugger_list_mutex_ptr) {
std::lock_guard<std::recursive_mutex> guard(*g_debugger_list_mutex_ptr);

View File

@ -161,7 +161,7 @@ size_t Disassembler::Disassemble(Debugger &debugger, const ArchSpec &arch,
bool Disassembler::Disassemble(Debugger &debugger, const ArchSpec &arch,
const char *plugin_name, const char *flavor,
const ExecutionContext &exe_ctx,
const ConstString &name, Module *module,
ConstString name, Module *module,
uint32_t num_instructions,
bool mixed_source_and_assembly,
uint32_t num_mixed_context_lines,

View File

@ -72,7 +72,7 @@ static inline bool cstring_is_mangled(const char *s) {
return cstring_mangling_scheme(s) != Mangled::eManglingSchemeNone;
}
static const ConstString &
static ConstString
get_demangled_name_without_arguments(ConstString mangled,
ConstString demangled) {
// This pair is <mangled name, demangled name without function arguments>
@ -133,7 +133,7 @@ Mangled::Mangled() : m_mangled(), m_demangled() {}
// Constructor with an optional string and a boolean indicating if it is the
// mangled version.
//----------------------------------------------------------------------
Mangled::Mangled(const ConstString &s, bool mangled)
Mangled::Mangled(ConstString s, bool mangled)
: m_mangled(), m_demangled() {
if (s)
SetValue(s, mangled);
@ -144,7 +144,7 @@ Mangled::Mangled(llvm::StringRef name, bool is_mangled) {
SetValue(ConstString(name), is_mangled);
}
Mangled::Mangled(const ConstString &s) : m_mangled(), m_demangled() {
Mangled::Mangled(ConstString s) : m_mangled(), m_demangled() {
if (s)
SetValue(s);
}
@ -202,7 +202,7 @@ int Mangled::Compare(const Mangled &a, const Mangled &b) {
// Set the string value in this objects. If "mangled" is true, then the mangled
// named is set with the new value in "s", else the demangled name is set.
//----------------------------------------------------------------------
void Mangled::SetValue(const ConstString &s, bool mangled) {
void Mangled::SetValue(ConstString s, bool mangled) {
if (s) {
if (mangled) {
m_demangled.Clear();
@ -217,7 +217,7 @@ void Mangled::SetValue(const ConstString &s, bool mangled) {
}
}
void Mangled::SetValue(const ConstString &name) {
void Mangled::SetValue(ConstString name) {
if (name) {
if (cstring_is_mangled(name.GetCString())) {
m_demangled.Clear();
@ -362,7 +362,7 @@ bool Mangled::DemangleWithRichManglingInfo(
// name. The result is cached and will be kept until a new string value is
// supplied to this object, or until the end of the object's lifetime.
//----------------------------------------------------------------------
const ConstString &
ConstString
Mangled::GetDemangledName(lldb::LanguageType language) const {
// Check to make sure we have a valid mangled name and that we haven't
// already decoded our mangled name.
@ -514,7 +514,7 @@ Stream &operator<<(Stream &s, const Mangled &obj) {
if (obj.GetMangledName())
s << "mangled = '" << obj.GetMangledName() << "'";
const ConstString &demangled =
ConstString demangled =
obj.GetDemangledName(lldb::eLanguageTypeUnknown);
if (demangled)
s << ", demangled = '" << demangled << '\'';

View File

@ -598,7 +598,7 @@ uint32_t Module::ResolveSymbolContextsForFileSpec(
return sc_list.GetSize() - initial_count;
}
size_t Module::FindGlobalVariables(const ConstString &name,
size_t Module::FindGlobalVariables(ConstString name,
const CompilerDeclContext *parent_decl_ctx,
size_t max_matches,
VariableList &variables) {
@ -638,7 +638,7 @@ size_t Module::FindCompileUnits(const FileSpec &path, bool append,
return sc_list.GetSize() - start_size;
}
Module::LookupInfo::LookupInfo(const ConstString &name,
Module::LookupInfo::LookupInfo(ConstString name,
FunctionNameType name_type_mask,
LanguageType language)
: m_name(name), m_lookup_name(), m_language(language),
@ -798,7 +798,7 @@ void Module::LookupInfo::Prune(SymbolContextList &sc_list,
}
}
size_t Module::FindFunctions(const ConstString &name,
size_t Module::FindFunctions(ConstString name,
const CompilerDeclContext *parent_decl_ctx,
FunctionNameType name_type_mask,
bool include_symbols, bool include_inlines,
@ -946,7 +946,7 @@ void Module::FindAddressesForLine(const lldb::TargetSP target_sp,
}
size_t Module::FindTypes_Impl(
const ConstString &name, const CompilerDeclContext *parent_decl_ctx,
ConstString name, const CompilerDeclContext *parent_decl_ctx,
bool append, size_t max_matches,
llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
TypeMap &types) {
@ -959,7 +959,7 @@ size_t Module::FindTypes_Impl(
return 0;
}
size_t Module::FindTypesInNamespace(const ConstString &type_name,
size_t Module::FindTypesInNamespace(ConstString type_name,
const CompilerDeclContext *parent_decl_ctx,
size_t max_matches, TypeList &type_list) {
const bool append = true;
@ -977,7 +977,7 @@ size_t Module::FindTypesInNamespace(const ConstString &type_name,
}
lldb::TypeSP Module::FindFirstType(const SymbolContext &sc,
const ConstString &name, bool exact_match) {
ConstString name, bool exact_match) {
TypeList type_list;
llvm::DenseSet<lldb_private::SymbolFile *> searched_symbol_files;
const size_t num_matches =
@ -988,7 +988,7 @@ lldb::TypeSP Module::FindFirstType(const SymbolContext &sc,
}
size_t Module::FindTypes(
const ConstString &name, bool exact_match, size_t max_matches,
ConstString name, bool exact_match, size_t max_matches,
llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
TypeList &types) {
size_t num_matches = 0;
@ -1063,7 +1063,7 @@ SymbolVendor *Module::GetSymbolVendor(bool can_create,
}
void Module::SetFileSpecAndObjectName(const FileSpec &file,
const ConstString &object_name) {
ConstString object_name) {
// Container objects whose paths do not specify a file directly can call this
// function to correct the file and object names.
m_file = file;
@ -1246,7 +1246,7 @@ TypeList *Module::GetTypeList() {
return nullptr;
}
const ConstString &Module::GetObjectName() const { return m_object_name; }
ConstString Module::GetObjectName() const { return m_object_name; }
ObjectFile *Module::GetObjectFile() {
if (!m_did_load_objfile.load()) {
@ -1306,7 +1306,7 @@ SectionList *Module::GetUnifiedSectionList() {
return m_sections_up.get();
}
const Symbol *Module::FindFirstSymbolWithNameAndType(const ConstString &name,
const Symbol *Module::FindFirstSymbolWithNameAndType(ConstString name,
SymbolType symbol_type) {
static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
Timer scoped_timer(
@ -1339,7 +1339,7 @@ void Module::SymbolIndicesToSymbolContextList(
}
}
size_t Module::FindFunctionSymbols(const ConstString &name,
size_t Module::FindFunctionSymbols(ConstString name,
uint32_t name_type_mask,
SymbolContextList &sc_list) {
static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
@ -1355,7 +1355,7 @@ size_t Module::FindFunctionSymbols(const ConstString &name,
return 0;
}
size_t Module::FindSymbolsWithNameAndType(const ConstString &name,
size_t Module::FindSymbolsWithNameAndType(ConstString name,
SymbolType symbol_type,
SymbolContextList &sc_list) {
// No need to protect this call using m_mutex all other method calls are
@ -1625,7 +1625,7 @@ bool Module::MatchesModuleSpec(const ModuleSpec &module_ref) {
return false;
}
const ConstString &object_name = module_ref.GetObjectName();
ConstString object_name = module_ref.GetObjectName();
if (object_name) {
if (object_name != GetObjectName())
return false;

View File

@ -344,7 +344,7 @@ ModuleSP ModuleList::GetModuleAtIndexUnlocked(size_t idx) const {
return module_sp;
}
size_t ModuleList::FindFunctions(const ConstString &name,
size_t ModuleList::FindFunctions(ConstString name,
FunctionNameType name_type_mask,
bool include_symbols, bool include_inlines,
bool append,
@ -380,7 +380,7 @@ size_t ModuleList::FindFunctions(const ConstString &name,
return sc_list.GetSize() - old_size;
}
size_t ModuleList::FindFunctionSymbols(const ConstString &name,
size_t ModuleList::FindFunctionSymbols(ConstString name,
lldb::FunctionNameType name_type_mask,
SymbolContextList &sc_list) {
const size_t old_size = sc_list.GetSize();
@ -439,7 +439,7 @@ size_t ModuleList::FindCompileUnits(const FileSpec &path, bool append,
return sc_list.GetSize();
}
size_t ModuleList::FindGlobalVariables(const ConstString &name,
size_t ModuleList::FindGlobalVariables(ConstString name,
size_t max_matches,
VariableList &variable_list) const {
size_t initial_size = variable_list.GetSize();
@ -463,7 +463,7 @@ size_t ModuleList::FindGlobalVariables(const RegularExpression &regex,
return variable_list.GetSize() - initial_size;
}
size_t ModuleList::FindSymbolsWithNameAndType(const ConstString &name,
size_t ModuleList::FindSymbolsWithNameAndType(ConstString name,
SymbolType symbol_type,
SymbolContextList &sc_list,
bool append) const {
@ -542,7 +542,7 @@ ModuleSP ModuleList::FindModule(const UUID &uuid) const {
}
size_t
ModuleList::FindTypes(Module *search_first, const ConstString &name,
ModuleList::FindTypes(Module *search_first, ConstString name,
bool name_is_fully_qualified, size_t max_matches,
llvm::DenseSet<SymbolFile *> &searched_symbol_files,
TypeList &types) const {

View File

@ -219,7 +219,7 @@ static ABIInstances &GetABIInstances() {
return g_instances;
}
bool PluginManager::RegisterPlugin(const ConstString &name,
bool PluginManager::RegisterPlugin(ConstString name,
const char *description,
ABICreateInstance create_callback) {
if (create_callback) {
@ -261,7 +261,7 @@ ABICreateInstance PluginManager::GetABICreateCallbackAtIndex(uint32_t idx) {
}
ABICreateInstance
PluginManager::GetABICreateCallbackForPluginName(const ConstString &name) {
PluginManager::GetABICreateCallbackForPluginName(ConstString name) {
if (name) {
std::lock_guard<std::recursive_mutex> guard(GetABIInstancesMutex());
ABIInstances &instances = GetABIInstances();
@ -295,7 +295,7 @@ static ArchitectureInstances &GetArchitectureInstances() {
return g_instances;
}
void PluginManager::RegisterPlugin(const ConstString &name,
void PluginManager::RegisterPlugin(ConstString name,
llvm::StringRef description,
ArchitectureCreateInstance create_callback) {
std::lock_guard<std::mutex> guard(GetArchitectureMutex());
@ -348,7 +348,7 @@ static DisassemblerInstances &GetDisassemblerInstances() {
return g_instances;
}
bool PluginManager::RegisterPlugin(const ConstString &name,
bool PluginManager::RegisterPlugin(ConstString name,
const char *description,
DisassemblerCreateInstance create_callback) {
if (create_callback) {
@ -393,7 +393,7 @@ PluginManager::GetDisassemblerCreateCallbackAtIndex(uint32_t idx) {
DisassemblerCreateInstance
PluginManager::GetDisassemblerCreateCallbackForPluginName(
const ConstString &name) {
ConstString name) {
if (name) {
std::lock_guard<std::recursive_mutex> guard(GetDisassemblerMutex());
DisassemblerInstances &instances = GetDisassemblerInstances();
@ -433,7 +433,7 @@ static DynamicLoaderInstances &GetDynamicLoaderInstances() {
}
bool PluginManager::RegisterPlugin(
const ConstString &name, const char *description,
ConstString name, const char *description,
DynamicLoaderCreateInstance create_callback,
DebuggerInitializeCallback debugger_init_callback) {
if (create_callback) {
@ -478,7 +478,7 @@ PluginManager::GetDynamicLoaderCreateCallbackAtIndex(uint32_t idx) {
DynamicLoaderCreateInstance
PluginManager::GetDynamicLoaderCreateCallbackForPluginName(
const ConstString &name) {
ConstString name) {
if (name) {
std::lock_guard<std::recursive_mutex> guard(GetDynamicLoaderMutex());
DynamicLoaderInstances &instances = GetDynamicLoaderInstances();
@ -518,7 +518,7 @@ static JITLoaderInstances &GetJITLoaderInstances() {
}
bool PluginManager::RegisterPlugin(
const ConstString &name, const char *description,
ConstString name, const char *description,
JITLoaderCreateInstance create_callback,
DebuggerInitializeCallback debugger_init_callback) {
if (create_callback) {
@ -561,7 +561,7 @@ PluginManager::GetJITLoaderCreateCallbackAtIndex(uint32_t idx) {
}
JITLoaderCreateInstance PluginManager::GetJITLoaderCreateCallbackForPluginName(
const ConstString &name) {
ConstString name) {
if (name) {
std::lock_guard<std::recursive_mutex> guard(GetJITLoaderMutex());
JITLoaderInstances &instances = GetJITLoaderInstances();
@ -599,7 +599,7 @@ static EmulateInstructionInstances &GetEmulateInstructionInstances() {
}
bool PluginManager::RegisterPlugin(
const ConstString &name, const char *description,
ConstString name, const char *description,
EmulateInstructionCreateInstance create_callback) {
if (create_callback) {
EmulateInstructionInstance instance;
@ -642,7 +642,7 @@ PluginManager::GetEmulateInstructionCreateCallbackAtIndex(uint32_t idx) {
EmulateInstructionCreateInstance
PluginManager::GetEmulateInstructionCreateCallbackForPluginName(
const ConstString &name) {
ConstString name) {
if (name) {
std::lock_guard<std::recursive_mutex> guard(GetEmulateInstructionMutex());
EmulateInstructionInstances &instances = GetEmulateInstructionInstances();
@ -682,7 +682,7 @@ static OperatingSystemInstances &GetOperatingSystemInstances() {
}
bool PluginManager::RegisterPlugin(
const ConstString &name, const char *description,
ConstString name, const char *description,
OperatingSystemCreateInstance create_callback,
DebuggerInitializeCallback debugger_init_callback) {
if (create_callback) {
@ -727,7 +727,7 @@ PluginManager::GetOperatingSystemCreateCallbackAtIndex(uint32_t idx) {
OperatingSystemCreateInstance
PluginManager::GetOperatingSystemCreateCallbackForPluginName(
const ConstString &name) {
ConstString name) {
if (name) {
std::lock_guard<std::recursive_mutex> guard(GetOperatingSystemMutex());
OperatingSystemInstances &instances = GetOperatingSystemInstances();
@ -763,7 +763,7 @@ static LanguageInstances &GetLanguageInstances() {
return g_instances;
}
bool PluginManager::RegisterPlugin(const ConstString &name,
bool PluginManager::RegisterPlugin(ConstString name,
const char *description,
LanguageCreateInstance create_callback) {
if (create_callback) {
@ -805,7 +805,7 @@ PluginManager::GetLanguageCreateCallbackAtIndex(uint32_t idx) {
}
LanguageCreateInstance
PluginManager::GetLanguageCreateCallbackForPluginName(const ConstString &name) {
PluginManager::GetLanguageCreateCallbackForPluginName(ConstString name) {
if (name) {
std::lock_guard<std::recursive_mutex> guard(GetLanguageMutex());
LanguageInstances &instances = GetLanguageInstances();
@ -843,7 +843,7 @@ static LanguageRuntimeInstances &GetLanguageRuntimeInstances() {
}
bool PluginManager::RegisterPlugin(
const ConstString &name, const char *description,
ConstString name, const char *description,
LanguageRuntimeCreateInstance create_callback,
LanguageRuntimeGetCommandObject command_callback) {
if (create_callback) {
@ -897,7 +897,7 @@ PluginManager::GetLanguageRuntimeGetCommandObjectAtIndex(uint32_t idx) {
LanguageRuntimeCreateInstance
PluginManager::GetLanguageRuntimeCreateCallbackForPluginName(
const ConstString &name) {
ConstString name) {
if (name) {
std::lock_guard<std::recursive_mutex> guard(GetLanguageRuntimeMutex());
LanguageRuntimeInstances &instances = GetLanguageRuntimeInstances();
@ -934,7 +934,7 @@ static SystemRuntimeInstances &GetSystemRuntimeInstances() {
}
bool PluginManager::RegisterPlugin(
const ConstString &name, const char *description,
ConstString name, const char *description,
SystemRuntimeCreateInstance create_callback) {
if (create_callback) {
SystemRuntimeInstance instance;
@ -977,7 +977,7 @@ PluginManager::GetSystemRuntimeCreateCallbackAtIndex(uint32_t idx) {
SystemRuntimeCreateInstance
PluginManager::GetSystemRuntimeCreateCallbackForPluginName(
const ConstString &name) {
ConstString name) {
if (name) {
std::lock_guard<std::recursive_mutex> guard(GetSystemRuntimeMutex());
SystemRuntimeInstances &instances = GetSystemRuntimeInstances();
@ -1020,7 +1020,7 @@ static ObjectFileInstances &GetObjectFileInstances() {
}
bool PluginManager::RegisterPlugin(
const ConstString &name, const char *description,
ConstString name, const char *description,
ObjectFileCreateInstance create_callback,
ObjectFileCreateMemoryInstance create_memory_callback,
ObjectFileGetModuleSpecifications get_module_specifications,
@ -1087,7 +1087,7 @@ PluginManager::GetObjectFileGetModuleSpecificationsCallbackAtIndex(
ObjectFileCreateInstance
PluginManager::GetObjectFileCreateCallbackForPluginName(
const ConstString &name) {
ConstString name) {
if (name) {
std::lock_guard<std::recursive_mutex> guard(GetObjectFileMutex());
ObjectFileInstances &instances = GetObjectFileInstances();
@ -1103,7 +1103,7 @@ PluginManager::GetObjectFileCreateCallbackForPluginName(
ObjectFileCreateMemoryInstance
PluginManager::GetObjectFileCreateMemoryCallbackForPluginName(
const ConstString &name) {
ConstString name) {
if (name) {
std::lock_guard<std::recursive_mutex> guard(GetObjectFileMutex());
ObjectFileInstances &instances = GetObjectFileInstances();
@ -1159,7 +1159,7 @@ static ObjectContainerInstances &GetObjectContainerInstances() {
}
bool PluginManager::RegisterPlugin(
const ConstString &name, const char *description,
ConstString name, const char *description,
ObjectContainerCreateInstance create_callback,
ObjectFileGetModuleSpecifications get_module_specifications) {
if (create_callback) {
@ -1204,7 +1204,7 @@ PluginManager::GetObjectContainerCreateCallbackAtIndex(uint32_t idx) {
ObjectContainerCreateInstance
PluginManager::GetObjectContainerCreateCallbackForPluginName(
const ConstString &name) {
ConstString name) {
if (name) {
std::lock_guard<std::recursive_mutex> guard(GetObjectContainerMutex());
ObjectContainerInstances &instances = GetObjectContainerInstances();
@ -1254,7 +1254,7 @@ static PlatformInstances &GetPlatformInstances() {
}
bool PluginManager::RegisterPlugin(
const ConstString &name, const char *description,
ConstString name, const char *description,
PlatformCreateInstance create_callback,
DebuggerInitializeCallback debugger_init_callback) {
if (create_callback) {
@ -1315,7 +1315,7 @@ PluginManager::GetPlatformCreateCallbackAtIndex(uint32_t idx) {
}
PlatformCreateInstance
PluginManager::GetPlatformCreateCallbackForPluginName(const ConstString &name) {
PluginManager::GetPlatformCreateCallbackForPluginName(ConstString name) {
if (name) {
std::lock_guard<std::recursive_mutex> guard(GetPlatformInstancesMutex());
PlatformInstances &instances = GetPlatformInstances();
@ -1373,7 +1373,7 @@ static ProcessInstances &GetProcessInstances() {
}
bool PluginManager::RegisterPlugin(
const ConstString &name, const char *description,
ConstString name, const char *description,
ProcessCreateInstance create_callback,
DebuggerInitializeCallback debugger_init_callback) {
if (create_callback) {
@ -1432,7 +1432,7 @@ PluginManager::GetProcessCreateCallbackAtIndex(uint32_t idx) {
}
ProcessCreateInstance
PluginManager::GetProcessCreateCallbackForPluginName(const ConstString &name) {
PluginManager::GetProcessCreateCallbackForPluginName(ConstString name) {
if (name) {
std::lock_guard<std::recursive_mutex> guard(GetProcessMutex());
ProcessInstances &instances = GetProcessInstances();
@ -1472,7 +1472,7 @@ static ScriptInterpreterInstances &GetScriptInterpreterInstances() {
}
bool PluginManager::RegisterPlugin(
const ConstString &name, const char *description,
ConstString name, const char *description,
lldb::ScriptLanguage script_language,
ScriptInterpreterCreateInstance create_callback) {
if (!create_callback)
@ -1568,7 +1568,7 @@ static StructuredDataPluginInstances &GetStructuredDataPluginInstances() {
}
bool PluginManager::RegisterPlugin(
const ConstString &name, const char *description,
ConstString name, const char *description,
StructuredDataPluginCreateInstance create_callback,
DebuggerInitializeCallback debugger_init_callback,
StructuredDataFilterLaunchInfo filter_callback) {
@ -1616,7 +1616,7 @@ PluginManager::GetStructuredDataPluginCreateCallbackAtIndex(uint32_t idx) {
StructuredDataPluginCreateInstance
PluginManager::GetStructuredDataPluginCreateCallbackForPluginName(
const ConstString &name) {
ConstString name) {
if (name) {
std::lock_guard<std::recursive_mutex> guard(GetStructuredDataPluginMutex());
StructuredDataPluginInstances &instances =
@ -1671,7 +1671,7 @@ static SymbolFileInstances &GetSymbolFileInstances() {
}
bool PluginManager::RegisterPlugin(
const ConstString &name, const char *description,
ConstString name, const char *description,
SymbolFileCreateInstance create_callback,
DebuggerInitializeCallback debugger_init_callback) {
if (create_callback) {
@ -1715,7 +1715,7 @@ PluginManager::GetSymbolFileCreateCallbackAtIndex(uint32_t idx) {
SymbolFileCreateInstance
PluginManager::GetSymbolFileCreateCallbackForPluginName(
const ConstString &name) {
ConstString name) {
if (name) {
std::lock_guard<std::recursive_mutex> guard(GetSymbolFileMutex());
SymbolFileInstances &instances = GetSymbolFileInstances();
@ -1751,7 +1751,7 @@ static SymbolVendorInstances &GetSymbolVendorInstances() {
return g_instances;
}
bool PluginManager::RegisterPlugin(const ConstString &name,
bool PluginManager::RegisterPlugin(ConstString name,
const char *description,
SymbolVendorCreateInstance create_callback) {
if (create_callback) {
@ -1795,7 +1795,7 @@ PluginManager::GetSymbolVendorCreateCallbackAtIndex(uint32_t idx) {
SymbolVendorCreateInstance
PluginManager::GetSymbolVendorCreateCallbackForPluginName(
const ConstString &name) {
ConstString name) {
if (name) {
std::lock_guard<std::recursive_mutex> guard(GetSymbolVendorMutex());
SymbolVendorInstances &instances = GetSymbolVendorInstances();
@ -1832,7 +1832,7 @@ static UnwindAssemblyInstances &GetUnwindAssemblyInstances() {
}
bool PluginManager::RegisterPlugin(
const ConstString &name, const char *description,
ConstString name, const char *description,
UnwindAssemblyCreateInstance create_callback) {
if (create_callback) {
UnwindAssemblyInstance instance;
@ -1875,7 +1875,7 @@ PluginManager::GetUnwindAssemblyCreateCallbackAtIndex(uint32_t idx) {
UnwindAssemblyCreateInstance
PluginManager::GetUnwindAssemblyCreateCallbackForPluginName(
const ConstString &name) {
ConstString name) {
if (name) {
std::lock_guard<std::recursive_mutex> guard(GetUnwindAssemblyMutex());
UnwindAssemblyInstances &instances = GetUnwindAssemblyInstances();
@ -1912,7 +1912,7 @@ static MemoryHistoryInstances &GetMemoryHistoryInstances() {
}
bool PluginManager::RegisterPlugin(
const ConstString &name, const char *description,
ConstString name, const char *description,
MemoryHistoryCreateInstance create_callback) {
if (create_callback) {
MemoryHistoryInstance instance;
@ -1955,7 +1955,7 @@ PluginManager::GetMemoryHistoryCreateCallbackAtIndex(uint32_t idx) {
MemoryHistoryCreateInstance
PluginManager::GetMemoryHistoryCreateCallbackForPluginName(
const ConstString &name) {
ConstString name) {
if (name) {
std::lock_guard<std::recursive_mutex> guard(GetMemoryHistoryMutex());
MemoryHistoryInstances &instances = GetMemoryHistoryInstances();
@ -1995,7 +1995,7 @@ static InstrumentationRuntimeInstances &GetInstrumentationRuntimeInstances() {
}
bool PluginManager::RegisterPlugin(
const ConstString &name, const char *description,
ConstString name, const char *description,
InstrumentationRuntimeCreateInstance create_callback,
InstrumentationRuntimeGetType get_type_callback) {
if (create_callback) {
@ -2054,7 +2054,7 @@ PluginManager::GetInstrumentationRuntimeCreateCallbackAtIndex(uint32_t idx) {
InstrumentationRuntimeCreateInstance
PluginManager::GetInstrumentationRuntimeCreateCallbackForPluginName(
const ConstString &name) {
ConstString name) {
if (name) {
std::lock_guard<std::recursive_mutex> guard(
GetInstrumentationRuntimeMutex());
@ -2093,7 +2093,7 @@ static TypeSystemInstances &GetTypeSystemInstances() {
return g_instances;
}
bool PluginManager::RegisterPlugin(const ConstString &name,
bool PluginManager::RegisterPlugin(ConstString name,
const char *description,
TypeSystemCreateInstance create_callback,
TypeSystemEnumerateSupportedLanguages
@ -2139,7 +2139,7 @@ PluginManager::GetTypeSystemCreateCallbackAtIndex(uint32_t idx) {
TypeSystemCreateInstance
PluginManager::GetTypeSystemCreateCallbackForPluginName(
const ConstString &name) {
ConstString name) {
if (name) {
std::lock_guard<std::recursive_mutex> guard(GetTypeSystemMutex());
TypeSystemInstances &instances = GetTypeSystemInstances();
@ -2165,7 +2165,7 @@ PluginManager::GetTypeSystemEnumerateSupportedLanguagesCallbackAtIndex(
TypeSystemEnumerateSupportedLanguages
PluginManager::GetTypeSystemEnumerateSupportedLanguagesCallbackForPluginName(
const ConstString &name) {
ConstString name) {
if (name) {
std::lock_guard<std::recursive_mutex> guard(GetTypeSystemMutex());
TypeSystemInstances &instances = GetTypeSystemInstances();
@ -2203,7 +2203,7 @@ static REPLInstances &GetREPLInstances() {
}
bool PluginManager::RegisterPlugin(
const ConstString &name, const char *description,
ConstString name, const char *description,
REPLCreateInstance create_callback,
REPLEnumerateSupportedLanguages enumerate_languages_callback) {
if (create_callback) {
@ -2245,7 +2245,7 @@ REPLCreateInstance PluginManager::GetREPLCreateCallbackAtIndex(uint32_t idx) {
}
REPLCreateInstance
PluginManager::GetREPLCreateCallbackForPluginName(const ConstString &name) {
PluginManager::GetREPLCreateCallbackForPluginName(ConstString name) {
if (name) {
std::lock_guard<std::recursive_mutex> guard(GetREPLMutex());
REPLInstances &instances = GetREPLInstances();
@ -2270,7 +2270,7 @@ PluginManager::GetREPLEnumerateSupportedLanguagesCallbackAtIndex(uint32_t idx) {
REPLEnumerateSupportedLanguages
PluginManager::GetREPLSystemEnumerateSupportedLanguagesCallbackForPluginName(
const ConstString &name) {
ConstString name) {
if (name) {
std::lock_guard<std::recursive_mutex> guard(GetREPLMutex());
REPLInstances &instances = GetREPLInstances();
@ -2367,8 +2367,8 @@ void PluginManager::DebuggerInitialize(Debugger &debugger) {
// This will put a plugin's settings under e.g.
// "plugin.<plugin_type_name>.<plugin_type_desc>.SETTINGNAME".
static lldb::OptionValuePropertiesSP GetDebuggerPropertyForPlugins(
Debugger &debugger, const ConstString &plugin_type_name,
const ConstString &plugin_type_desc, bool can_create) {
Debugger &debugger, ConstString plugin_type_name,
ConstString plugin_type_desc, bool can_create) {
lldb::OptionValuePropertiesSP parent_properties_sp(
debugger.GetValueProperties());
if (parent_properties_sp) {
@ -2403,8 +2403,8 @@ static lldb::OptionValuePropertiesSP GetDebuggerPropertyForPlugins(
// "<plugin_type_name>.plugin.<plugin_type_desc>.SETTINGNAME" and Platform
// generic settings would be under "platform.SETTINGNAME".
static lldb::OptionValuePropertiesSP GetDebuggerPropertyForPluginsOldStyle(
Debugger &debugger, const ConstString &plugin_type_name,
const ConstString &plugin_type_desc, bool can_create) {
Debugger &debugger, ConstString plugin_type_name,
ConstString plugin_type_desc, bool can_create) {
static ConstString g_property_name("plugin");
lldb::OptionValuePropertiesSP parent_properties_sp(
debugger.GetValueProperties());
@ -2437,12 +2437,12 @@ static lldb::OptionValuePropertiesSP GetDebuggerPropertyForPluginsOldStyle(
namespace {
typedef lldb::OptionValuePropertiesSP
GetDebuggerPropertyForPluginsPtr(Debugger &, const ConstString &,
const ConstString &, bool can_create);
GetDebuggerPropertyForPluginsPtr(Debugger &, ConstString ,
ConstString , bool can_create);
lldb::OptionValuePropertiesSP
GetSettingForPlugin(Debugger &debugger, const ConstString &setting_name,
const ConstString &plugin_type_name,
GetSettingForPlugin(Debugger &debugger, ConstString setting_name,
ConstString plugin_type_name,
GetDebuggerPropertyForPluginsPtr get_debugger_property =
GetDebuggerPropertyForPlugins) {
lldb::OptionValuePropertiesSP properties_sp;
@ -2457,10 +2457,10 @@ GetSettingForPlugin(Debugger &debugger, const ConstString &setting_name,
}
bool CreateSettingForPlugin(
Debugger &debugger, const ConstString &plugin_type_name,
const ConstString &plugin_type_desc,
Debugger &debugger, ConstString plugin_type_name,
ConstString plugin_type_desc,
const lldb::OptionValuePropertiesSP &properties_sp,
const ConstString &description, bool is_global_property,
ConstString description, bool is_global_property,
GetDebuggerPropertyForPluginsPtr get_debugger_property =
GetDebuggerPropertyForPlugins) {
if (properties_sp) {
@ -2487,14 +2487,14 @@ const char *kStructuredDataPluginName("structured-data");
} // anonymous namespace
lldb::OptionValuePropertiesSP PluginManager::GetSettingForDynamicLoaderPlugin(
Debugger &debugger, const ConstString &setting_name) {
Debugger &debugger, ConstString setting_name) {
return GetSettingForPlugin(debugger, setting_name,
ConstString(kDynamicLoaderPluginName));
}
bool PluginManager::CreateSettingForDynamicLoaderPlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
const ConstString &description, bool is_global_property) {
ConstString description, bool is_global_property) {
return CreateSettingForPlugin(
debugger, ConstString(kDynamicLoaderPluginName),
ConstString("Settings for dynamic loader plug-ins"), properties_sp,
@ -2503,7 +2503,7 @@ bool PluginManager::CreateSettingForDynamicLoaderPlugin(
lldb::OptionValuePropertiesSP
PluginManager::GetSettingForPlatformPlugin(Debugger &debugger,
const ConstString &setting_name) {
ConstString setting_name) {
return GetSettingForPlugin(debugger, setting_name,
ConstString(kPlatformPluginName),
GetDebuggerPropertyForPluginsOldStyle);
@ -2511,7 +2511,7 @@ PluginManager::GetSettingForPlatformPlugin(Debugger &debugger,
bool PluginManager::CreateSettingForPlatformPlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
const ConstString &description, bool is_global_property) {
ConstString description, bool is_global_property) {
return CreateSettingForPlugin(debugger, ConstString(kPlatformPluginName),
ConstString("Settings for platform plug-ins"),
properties_sp, description, is_global_property,
@ -2520,14 +2520,14 @@ bool PluginManager::CreateSettingForPlatformPlugin(
lldb::OptionValuePropertiesSP
PluginManager::GetSettingForProcessPlugin(Debugger &debugger,
const ConstString &setting_name) {
ConstString setting_name) {
return GetSettingForPlugin(debugger, setting_name,
ConstString(kProcessPluginName));
}
bool PluginManager::CreateSettingForProcessPlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
const ConstString &description, bool is_global_property) {
ConstString description, bool is_global_property) {
return CreateSettingForPlugin(debugger, ConstString(kProcessPluginName),
ConstString("Settings for process plug-ins"),
properties_sp, description, is_global_property);
@ -2535,14 +2535,14 @@ bool PluginManager::CreateSettingForProcessPlugin(
lldb::OptionValuePropertiesSP
PluginManager::GetSettingForSymbolFilePlugin(Debugger &debugger,
const ConstString &setting_name) {
ConstString setting_name) {
return GetSettingForPlugin(debugger, setting_name,
ConstString(kSymbolFilePluginName));
}
bool PluginManager::CreateSettingForSymbolFilePlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
const ConstString &description, bool is_global_property) {
ConstString description, bool is_global_property) {
return CreateSettingForPlugin(
debugger, ConstString(kSymbolFilePluginName),
ConstString("Settings for symbol file plug-ins"), properties_sp,
@ -2551,14 +2551,14 @@ bool PluginManager::CreateSettingForSymbolFilePlugin(
lldb::OptionValuePropertiesSP
PluginManager::GetSettingForJITLoaderPlugin(Debugger &debugger,
const ConstString &setting_name) {
ConstString setting_name) {
return GetSettingForPlugin(debugger, setting_name,
ConstString(kJITLoaderPluginName));
}
bool PluginManager::CreateSettingForJITLoaderPlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
const ConstString &description, bool is_global_property) {
ConstString description, bool is_global_property) {
return CreateSettingForPlugin(debugger, ConstString(kJITLoaderPluginName),
ConstString("Settings for JIT loader plug-ins"),
properties_sp, description, is_global_property);
@ -2567,7 +2567,7 @@ bool PluginManager::CreateSettingForJITLoaderPlugin(
static const char *kOperatingSystemPluginName("os");
lldb::OptionValuePropertiesSP PluginManager::GetSettingForOperatingSystemPlugin(
Debugger &debugger, const ConstString &setting_name) {
Debugger &debugger, ConstString setting_name) {
lldb::OptionValuePropertiesSP properties_sp;
lldb::OptionValuePropertiesSP plugin_type_properties_sp(
GetDebuggerPropertyForPlugins(
@ -2582,7 +2582,7 @@ lldb::OptionValuePropertiesSP PluginManager::GetSettingForOperatingSystemPlugin(
bool PluginManager::CreateSettingForOperatingSystemPlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
const ConstString &description, bool is_global_property) {
ConstString description, bool is_global_property) {
if (properties_sp) {
lldb::OptionValuePropertiesSP plugin_type_properties_sp(
GetDebuggerPropertyForPlugins(
@ -2599,14 +2599,14 @@ bool PluginManager::CreateSettingForOperatingSystemPlugin(
}
lldb::OptionValuePropertiesSP PluginManager::GetSettingForStructuredDataPlugin(
Debugger &debugger, const ConstString &setting_name) {
Debugger &debugger, ConstString setting_name) {
return GetSettingForPlugin(debugger, setting_name,
ConstString(kStructuredDataPluginName));
}
bool PluginManager::CreateSettingForStructuredDataPlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
const ConstString &description, bool is_global_property) {
ConstString description, bool is_global_property) {
return CreateSettingForPlugin(
debugger, ConstString(kStructuredDataPluginName),
ConstString("Settings for structured data plug-ins"), properties_sp,

View File

@ -34,7 +34,7 @@ void RichManglingContext::ResetProvider(InfoProvider new_provider) {
m_provider = new_provider;
}
bool RichManglingContext::FromItaniumName(const ConstString &mangled) {
bool RichManglingContext::FromItaniumName(ConstString mangled) {
bool err = m_ipd.partialDemangle(mangled.GetCString());
if (!err) {
ResetProvider(ItaniumPartialDemangler);
@ -53,7 +53,7 @@ bool RichManglingContext::FromItaniumName(const ConstString &mangled) {
return !err; // true == success
}
bool RichManglingContext::FromCxxMethodName(const ConstString &demangled) {
bool RichManglingContext::FromCxxMethodName(ConstString demangled) {
ResetProvider(PluginCxxLanguage);
m_cxx_method_parser = new CPlusPlusLanguage::MethodName(demangled);
return true;

View File

@ -143,7 +143,7 @@ const char *Section::GetTypeAsCString() const {
}
Section::Section(const ModuleSP &module_sp, ObjectFile *obj_file,
user_id_t sect_id, const ConstString &name,
user_id_t sect_id, ConstString name,
SectionType sect_type, addr_t file_addr, addr_t byte_size,
lldb::offset_t file_offset, lldb::offset_t file_size,
uint32_t log2align, uint32_t flags,
@ -165,7 +165,7 @@ Section::Section(const ModuleSP &module_sp, ObjectFile *obj_file,
Section::Section(const lldb::SectionSP &parent_section_sp,
const ModuleSP &module_sp, ObjectFile *obj_file,
user_id_t sect_id, const ConstString &name,
user_id_t sect_id, ConstString name,
SectionType sect_type, addr_t file_addr, addr_t byte_size,
lldb::offset_t file_offset, lldb::offset_t file_size,
uint32_t log2align, uint32_t flags,
@ -506,7 +506,7 @@ SectionSP SectionList::GetSectionAtIndex(size_t idx) const {
}
SectionSP
SectionList::FindSectionByName(const ConstString &section_dstr) const {
SectionList::FindSectionByName(ConstString section_dstr) const {
SectionSP sect_sp;
// Check if we have a valid section string
if (section_dstr && !m_sections.empty()) {

View File

@ -94,7 +94,7 @@ Properties::Apropos(llvm::StringRef keyword,
lldb::OptionValuePropertiesSP
Properties::GetSubProperty(const ExecutionContext *exe_ctx,
const ConstString &name) {
ConstString name) {
OptionValuePropertiesSP properties_sp(GetValueProperties());
if (properties_sp)
return properties_sp->GetSubProperty(exe_ctx, name);

View File

@ -350,7 +350,7 @@ const Status &ValueObject::GetError() {
return m_error;
}
const ConstString &ValueObject::GetName() const { return m_name; }
ConstString ValueObject::GetName() const { return m_name; }
const char *ValueObject::GetLocationAsCString() {
return GetLocationAsCStringImpl(m_value, m_data);
@ -543,13 +543,13 @@ lldb::ValueObjectSP ValueObject::GetChildAtNamePath(
return root;
}
size_t ValueObject::GetIndexOfChildWithName(const ConstString &name) {
size_t ValueObject::GetIndexOfChildWithName(ConstString name) {
bool omit_empty_base_classes = true;
return GetCompilerType().GetIndexOfChildWithName(name.GetCString(),
omit_empty_base_classes);
}
ValueObjectSP ValueObject::GetChildMemberWithName(const ConstString &name,
ValueObjectSP ValueObject::GetChildMemberWithName(ConstString name,
bool can_create) {
// when getting a child by name, it could be buried inside some base classes
// (which really aren't part of the expression path), so we need a vector of
@ -617,7 +617,7 @@ void ValueObject::SetNumChildren(size_t num_children) {
m_children.SetChildrenCount(num_children);
}
void ValueObject::SetName(const ConstString &name) { m_name = name; }
void ValueObject::SetName(ConstString name) { m_name = name; }
ValueObject *ValueObject::CreateChildAtIndex(size_t idx,
bool synthetic_array_member,
@ -1657,12 +1657,12 @@ LanguageType ValueObject::GetObjectRuntimeLanguage() {
return GetCompilerType().GetMinimumLanguage();
}
void ValueObject::AddSyntheticChild(const ConstString &key,
void ValueObject::AddSyntheticChild(ConstString key,
ValueObject *valobj) {
m_synthetic_children[key] = valobj;
}
ValueObjectSP ValueObject::GetSyntheticChild(const ConstString &key) const {
ValueObjectSP ValueObject::GetSyntheticChild(ConstString key) const {
ValueObjectSP synthetic_child_sp;
std::map<ConstString, ValueObject *>::const_iterator pos =
m_synthetic_children.find(key);
@ -2740,7 +2740,7 @@ void ValueObject::Dump(Stream &s, const DumpValueObjectOptions &options) {
printer.PrintValueObject();
}
ValueObjectSP ValueObject::CreateConstantValue(const ConstString &name) {
ValueObjectSP ValueObject::CreateConstantValue(ConstString name) {
ValueObjectSP valobj_sp;
if (UpdateValueIfNeeded(false) && m_error.Success()) {
@ -2916,7 +2916,7 @@ ValueObjectSP ValueObject::Cast(const CompilerType &compiler_type) {
return ValueObjectCast::Create(*this, GetName(), compiler_type);
}
lldb::ValueObjectSP ValueObject::Clone(const ConstString &new_name) {
lldb::ValueObjectSP ValueObject::Clone(ConstString new_name) {
return ValueObjectCast::Create(*this, new_name, GetCompilerType());
}

View File

@ -22,14 +22,14 @@ class ConstString;
using namespace lldb_private;
lldb::ValueObjectSP ValueObjectCast::Create(ValueObject &parent,
const ConstString &name,
ConstString name,
const CompilerType &cast_type) {
ValueObjectCast *cast_valobj_ptr =
new ValueObjectCast(parent, name, cast_type);
return cast_valobj_ptr->GetSP();
}
ValueObjectCast::ValueObjectCast(ValueObject &parent, const ConstString &name,
ValueObjectCast::ValueObjectCast(ValueObject &parent, ConstString name,
const CompilerType &cast_type)
: ValueObject(parent), m_cast_type(cast_type) {
SetName(name);

View File

@ -28,7 +28,7 @@ using namespace lldb_private;
ValueObjectChild::ValueObjectChild(
ValueObject &parent, const CompilerType &compiler_type,
const ConstString &name, uint64_t byte_size, int32_t byte_offset,
ConstString name, uint64_t byte_size, int32_t byte_offset,
uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset,
bool is_base_class, bool is_deref_of_parent,
AddressType child_ptr_or_ref_addr_type, uint64_t language_flags)

View File

@ -49,7 +49,7 @@ ValueObjectConstResult::ValueObjectConstResult(ExecutionContextScope *exe_scope,
ValueObjectSP ValueObjectConstResult::Create(ExecutionContextScope *exe_scope,
const CompilerType &compiler_type,
const ConstString &name,
ConstString name,
const DataExtractor &data,
lldb::addr_t address) {
return (new ValueObjectConstResult(exe_scope, compiler_type, name, data,
@ -59,7 +59,7 @@ ValueObjectSP ValueObjectConstResult::Create(ExecutionContextScope *exe_scope,
ValueObjectConstResult::ValueObjectConstResult(
ExecutionContextScope *exe_scope, const CompilerType &compiler_type,
const ConstString &name, const DataExtractor &data, lldb::addr_t address)
ConstString name, const DataExtractor &data, lldb::addr_t address)
: ValueObject(exe_scope), m_type_name(), m_byte_size(0),
m_impl(this, address) {
m_data = data;
@ -81,7 +81,7 @@ ValueObjectConstResult::ValueObjectConstResult(
ValueObjectSP ValueObjectConstResult::Create(ExecutionContextScope *exe_scope,
const CompilerType &compiler_type,
const ConstString &name,
ConstString name,
const lldb::DataBufferSP &data_sp,
lldb::ByteOrder data_byte_order,
uint32_t data_addr_size,
@ -93,14 +93,14 @@ ValueObjectSP ValueObjectConstResult::Create(ExecutionContextScope *exe_scope,
ValueObjectSP ValueObjectConstResult::Create(ExecutionContextScope *exe_scope,
Value &value,
const ConstString &name,
ConstString name,
Module *module) {
return (new ValueObjectConstResult(exe_scope, value, name, module))->GetSP();
}
ValueObjectConstResult::ValueObjectConstResult(
ExecutionContextScope *exe_scope, const CompilerType &compiler_type,
const ConstString &name, const lldb::DataBufferSP &data_sp,
ConstString name, const lldb::DataBufferSP &data_sp,
lldb::ByteOrder data_byte_order, uint32_t data_addr_size,
lldb::addr_t address)
: ValueObject(exe_scope), m_type_name(), m_byte_size(0),
@ -120,7 +120,7 @@ ValueObjectConstResult::ValueObjectConstResult(
ValueObjectSP ValueObjectConstResult::Create(ExecutionContextScope *exe_scope,
const CompilerType &compiler_type,
const ConstString &name,
ConstString name,
lldb::addr_t address,
AddressType address_type,
uint32_t addr_byte_size) {
@ -131,7 +131,7 @@ ValueObjectSP ValueObjectConstResult::Create(ExecutionContextScope *exe_scope,
ValueObjectConstResult::ValueObjectConstResult(
ExecutionContextScope *exe_scope, const CompilerType &compiler_type,
const ConstString &name, lldb::addr_t address, AddressType address_type,
ConstString name, lldb::addr_t address, AddressType address_type,
uint32_t addr_byte_size)
: ValueObject(exe_scope), m_type_name(), m_byte_size(0),
m_impl(this, address) {
@ -175,7 +175,7 @@ ValueObjectConstResult::ValueObjectConstResult(ExecutionContextScope *exe_scope,
ValueObjectConstResult::ValueObjectConstResult(ExecutionContextScope *exe_scope,
const Value &value,
const ConstString &name,
ConstString name,
Module *module)
: ValueObject(exe_scope), m_type_name(), m_byte_size(0), m_impl(this) {
m_value = value;

View File

@ -21,7 +21,7 @@ class ValueObject;
using namespace lldb_private;
ValueObjectConstResultCast::ValueObjectConstResultCast(
ValueObject &parent, const ConstString &name, const CompilerType &cast_type,
ValueObject &parent, ConstString name, const CompilerType &cast_type,
lldb::addr_t live_address)
: ValueObjectCast(parent, name, cast_type), m_impl(this, live_address) {
m_name = name;

View File

@ -23,7 +23,7 @@ using namespace lldb_private;
ValueObjectConstResultChild::ValueObjectConstResultChild(
ValueObject &parent, const CompilerType &compiler_type,
const ConstString &name, uint32_t byte_size, int32_t byte_offset,
ConstString name, uint32_t byte_size, int32_t byte_offset,
uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset,
bool is_base_class, bool is_deref_of_parent, lldb::addr_t live_address,
uint64_t language_flags)

View File

@ -186,7 +186,7 @@ ValueObject *ValueObjectRegisterSet::CreateChildAtIndex(
}
lldb::ValueObjectSP
ValueObjectRegisterSet::GetChildMemberWithName(const ConstString &name,
ValueObjectRegisterSet::GetChildMemberWithName(ConstString name,
bool can_create) {
ValueObject *valobj = NULL;
if (m_reg_ctx_sp && m_reg_set) {
@ -203,7 +203,7 @@ ValueObjectRegisterSet::GetChildMemberWithName(const ConstString &name,
}
size_t
ValueObjectRegisterSet::GetIndexOfChildWithName(const ConstString &name) {
ValueObjectRegisterSet::GetIndexOfChildWithName(ConstString name) {
if (m_reg_ctx_sp && m_reg_set) {
const RegisterInfo *reg_info =
m_reg_ctx_sp->GetRegisterInfoByName(name.AsCString());

View File

@ -36,7 +36,7 @@ public:
return m_backend.GetChildAtIndex(idx, true);
}
size_t GetIndexOfChildWithName(const ConstString &name) override {
size_t GetIndexOfChildWithName(ConstString name) override {
return m_backend.GetIndexOfChildWithName(name);
}
@ -283,7 +283,7 @@ lldb::ValueObjectSP ValueObjectSynthetic::GetChildAtIndex(size_t idx,
}
lldb::ValueObjectSP
ValueObjectSynthetic::GetChildMemberWithName(const ConstString &name,
ValueObjectSynthetic::GetChildMemberWithName(ConstString name,
bool can_create) {
UpdateValueIfNeeded();
@ -295,7 +295,7 @@ ValueObjectSynthetic::GetChildMemberWithName(const ConstString &name,
return GetChildAtIndex(index, can_create);
}
size_t ValueObjectSynthetic::GetIndexOfChildWithName(const ConstString &name) {
size_t ValueObjectSynthetic::GetIndexOfChildWithName(ConstString name) {
UpdateValueIfNeeded();
uint32_t found_index = UINT32_MAX;

View File

@ -96,7 +96,7 @@ bool DataVisualization::AnyMatches(
matching_category, matching_type);
}
bool DataVisualization::Categories::GetCategory(const ConstString &category,
bool DataVisualization::Categories::GetCategory(ConstString category,
lldb::TypeCategoryImplSP &entry,
bool allow_create) {
entry = GetFormatManager().GetCategory(category, allow_create);
@ -111,11 +111,11 @@ bool DataVisualization::Categories::GetCategory(
return (entry.get() != nullptr);
}
void DataVisualization::Categories::Add(const ConstString &category) {
void DataVisualization::Categories::Add(ConstString category) {
GetFormatManager().GetCategory(category);
}
bool DataVisualization::Categories::Delete(const ConstString &category) {
bool DataVisualization::Categories::Delete(ConstString category) {
GetFormatManager().DisableCategory(category);
return GetFormatManager().DeleteCategory(category);
}
@ -124,12 +124,12 @@ void DataVisualization::Categories::Clear() {
GetFormatManager().ClearCategories();
}
void DataVisualization::Categories::Clear(const ConstString &category) {
void DataVisualization::Categories::Clear(ConstString category) {
GetFormatManager().GetCategory(category)->Clear(
eFormatCategoryItemSummary | eFormatCategoryItemRegexSummary);
}
void DataVisualization::Categories::Enable(const ConstString &category,
void DataVisualization::Categories::Enable(ConstString category,
TypeCategoryMap::Position pos) {
if (GetFormatManager().GetCategory(category)->IsEnabled())
GetFormatManager().DisableCategory(category);
@ -143,7 +143,7 @@ void DataVisualization::Categories::Enable(lldb::LanguageType lang_type) {
lang_category->Enable();
}
void DataVisualization::Categories::Disable(const ConstString &category) {
void DataVisualization::Categories::Disable(ConstString category) {
if (GetFormatManager().GetCategory(category)->IsEnabled())
GetFormatManager().DisableCategory(category);
}
@ -192,17 +192,17 @@ DataVisualization::Categories::GetCategoryAtIndex(size_t index) {
}
bool DataVisualization::NamedSummaryFormats::GetSummaryFormat(
const ConstString &type, lldb::TypeSummaryImplSP &entry) {
ConstString type, lldb::TypeSummaryImplSP &entry) {
return GetFormatManager().GetNamedSummaryContainer().Get(type, entry);
}
void DataVisualization::NamedSummaryFormats::Add(
const ConstString &type, const lldb::TypeSummaryImplSP &entry) {
ConstString type, const lldb::TypeSummaryImplSP &entry) {
GetFormatManager().GetNamedSummaryContainer().Add(
FormatManager::GetValidTypeName(type), entry);
}
bool DataVisualization::NamedSummaryFormats::Delete(const ConstString &type) {
bool DataVisualization::NamedSummaryFormats::Delete(ConstString type) {
return GetFormatManager().GetNamedSummaryContainer().Delete(type);
}

View File

@ -109,7 +109,7 @@ FormatCache::FormatCache()
{
}
FormatCache::Entry &FormatCache::GetEntry(const ConstString &type) {
FormatCache::Entry &FormatCache::GetEntry(ConstString type) {
auto i = m_map.find(type), e = m_map.end();
if (i != e)
return i->second;
@ -117,7 +117,7 @@ FormatCache::Entry &FormatCache::GetEntry(const ConstString &type) {
return m_map[type];
}
bool FormatCache::GetFormat(const ConstString &type,
bool FormatCache::GetFormat(ConstString type,
lldb::TypeFormatImplSP &format_sp) {
std::lock_guard<std::recursive_mutex> guard(m_mutex);
auto entry = GetEntry(type);
@ -135,7 +135,7 @@ bool FormatCache::GetFormat(const ConstString &type,
return false;
}
bool FormatCache::GetSummary(const ConstString &type,
bool FormatCache::GetSummary(ConstString type,
lldb::TypeSummaryImplSP &summary_sp) {
std::lock_guard<std::recursive_mutex> guard(m_mutex);
auto entry = GetEntry(type);
@ -153,7 +153,7 @@ bool FormatCache::GetSummary(const ConstString &type,
return false;
}
bool FormatCache::GetSynthetic(const ConstString &type,
bool FormatCache::GetSynthetic(ConstString type,
lldb::SyntheticChildrenSP &synthetic_sp) {
std::lock_guard<std::recursive_mutex> guard(m_mutex);
auto entry = GetEntry(type);
@ -171,7 +171,7 @@ bool FormatCache::GetSynthetic(const ConstString &type,
return false;
}
bool FormatCache::GetValidator(const ConstString &type,
bool FormatCache::GetValidator(ConstString type,
lldb::TypeValidatorImplSP &validator_sp) {
std::lock_guard<std::recursive_mutex> guard(m_mutex);
auto entry = GetEntry(type);
@ -189,25 +189,25 @@ bool FormatCache::GetValidator(const ConstString &type,
return false;
}
void FormatCache::SetFormat(const ConstString &type,
void FormatCache::SetFormat(ConstString type,
lldb::TypeFormatImplSP &format_sp) {
std::lock_guard<std::recursive_mutex> guard(m_mutex);
GetEntry(type).SetFormat(format_sp);
}
void FormatCache::SetSummary(const ConstString &type,
void FormatCache::SetSummary(ConstString type,
lldb::TypeSummaryImplSP &summary_sp) {
std::lock_guard<std::recursive_mutex> guard(m_mutex);
GetEntry(type).SetSummary(summary_sp);
}
void FormatCache::SetSynthetic(const ConstString &type,
void FormatCache::SetSynthetic(ConstString type,
lldb::SyntheticChildrenSP &synthetic_sp) {
std::lock_guard<std::recursive_mutex> guard(m_mutex);
GetEntry(type).SetSynthetic(synthetic_sp);
}
void FormatCache::SetValidator(const ConstString &type,
void FormatCache::SetValidator(ConstString type,
lldb::TypeValidatorImplSP &validator_sp) {
std::lock_guard<std::recursive_mutex> guard(m_mutex);
GetEntry(type).SetValidator(validator_sp);

View File

@ -431,7 +431,7 @@ void FormatManager::ForEachCategory(TypeCategoryMap::ForEachCallback callback) {
}
lldb::TypeCategoryImplSP
FormatManager::GetCategory(const ConstString &category_name, bool can_create) {
FormatManager::GetCategory(ConstString category_name, bool can_create) {
if (!category_name)
return GetCategory(m_default_category_name);
lldb::TypeCategoryImplSP category;
@ -573,7 +573,7 @@ bool FormatManager::ShouldPrintAsOneLiner(ValueObject &valobj) {
return true;
}
ConstString FormatManager::GetValidTypeName(const ConstString &type) {
ConstString FormatManager::GetValidTypeName(ConstString type) {
return ::GetValidTypeName_Impl(type);
}

View File

@ -51,7 +51,7 @@ bool TypeFilterImpl::SetExpressionPathAtIndex(size_t i,
}
size_t
TypeFilterImpl::FrontEnd::GetIndexOfChildWithName(const ConstString &name) {
TypeFilterImpl::FrontEnd::GetIndexOfChildWithName(ConstString name) {
const char *name_cstr = name.GetCString();
if (name_cstr) {
for (size_t i = 0; i < filter->GetCount(); i++) {
@ -188,7 +188,7 @@ bool ScriptedSyntheticChildren::FrontEnd::MightHaveChildren() {
}
size_t ScriptedSyntheticChildren::FrontEnd::GetIndexOfChildWithName(
const ConstString &name) {
ConstString name) {
if (!m_wrapper_sp || m_interpreter == NULL)
return UINT32_MAX;
return m_interpreter->GetIndexOfChildWithName(m_wrapper_sp,

View File

@ -233,7 +233,7 @@ public:
bool MightHaveChildren() override { return true; }
size_t GetIndexOfChildWithName(const ConstString &name) override {
size_t GetIndexOfChildWithName(ConstString name) override {
const char *item_name = name.GetCString();
uint32_t idx = ExtractIndexFromString(item_name);
if (idx < UINT32_MAX && idx >= CalculateNumChildren())

View File

@ -30,7 +30,7 @@ uint8_t *ExpressionVariable::GetValueBytes() {
PersistentExpressionState::~PersistentExpressionState() {}
lldb::addr_t PersistentExpressionState::LookupSymbol(const ConstString &name) {
lldb::addr_t PersistentExpressionState::LookupSymbol(ConstString name) {
SymbolMap::iterator si = m_symbol_map.find(name.GetCString());
if (si != m_symbol_map.end())

View File

@ -212,7 +212,7 @@ static void ReportInlineAsmError(const llvm::SMDiagnostic &diagnostic,
}
}
void IRExecutionUnit::ReportSymbolLookupError(const ConstString &name) {
void IRExecutionUnit::ReportSymbolLookupError(ConstString name) {
m_failed_lookups.push_back(name);
}
@ -406,7 +406,7 @@ void IRExecutionUnit::GetRunnableInfo(Status &error, lldb::addr_t &func_addr,
bool emitNewLine = false;
for (const ConstString &failed_lookup : m_failed_lookups) {
for (ConstString failed_lookup : m_failed_lookups) {
if (emitNewLine)
ss.PutCString("\n");
emitNewLine = true;
@ -655,7 +655,7 @@ uint8_t *IRExecutionUnit::MemoryManager::allocateDataSection(
}
static ConstString
FindBestAlternateMangledName(const ConstString &demangled,
FindBestAlternateMangledName(ConstString demangled,
const lldb::LanguageType &lang_type,
const SymbolContext &sym_ctx) {
CPlusPlusLanguage::MethodName cpp_name(demangled);
@ -717,7 +717,7 @@ struct IRExecutionUnit::SearchSpec {
void IRExecutionUnit::CollectCandidateCNames(
std::vector<IRExecutionUnit::SearchSpec> &C_specs,
const ConstString &name) {
ConstString name) {
if (m_strip_underscore && name.AsCString()[0] == '_')
C_specs.insert(C_specs.begin(), ConstString(&name.AsCString()[1]));
C_specs.push_back(SearchSpec(name));
@ -727,7 +727,7 @@ void IRExecutionUnit::CollectCandidateCPlusPlusNames(
std::vector<IRExecutionUnit::SearchSpec> &CPP_specs,
const std::vector<SearchSpec> &C_specs, const SymbolContext &sc) {
for (const SearchSpec &C_spec : C_specs) {
const ConstString &name = C_spec.name;
ConstString name = C_spec.name;
if (CPlusPlusLanguage::IsCPPMangledName(name.GetCString())) {
Mangled mangled(name, true);
@ -759,7 +759,7 @@ void IRExecutionUnit::CollectFallbackNames(
// but the DWARF doesn't always encode "extern C" correctly.
for (const SearchSpec &C_spec : C_specs) {
const ConstString &name = C_spec.name;
ConstString name = C_spec.name;
if (CPlusPlusLanguage::IsCPPMangledName(name.GetCString())) {
Mangled mangled_name(name);
@ -938,7 +938,7 @@ lldb::addr_t IRExecutionUnit::FindInUserDefinedSymbols(
}
lldb::addr_t
IRExecutionUnit::FindSymbol(const lldb_private::ConstString &name) {
IRExecutionUnit::FindSymbol(lldb_private::ConstString name) {
std::vector<SearchSpec> candidate_C_names;
std::vector<SearchSpec> candidate_CPlusPlus_names;

View File

@ -305,12 +305,12 @@ FileSystem::CreateDataBuffer(const FileSpec &file_spec, uint64_t size,
bool FileSystem::ResolveExecutableLocation(FileSpec &file_spec) {
// If the directory is set there's nothing to do.
const ConstString &directory = file_spec.GetDirectory();
ConstString directory = file_spec.GetDirectory();
if (directory)
return false;
// We cannot look for a file if there's no file name.
const ConstString &filename = file_spec.GetFilename();
ConstString filename = file_spec.GetFilename();
if (!filename)
return false;

View File

@ -276,7 +276,7 @@ Status OptionValueDictionary::SetSubValue(const ExecutionContext *exe_ctx,
}
lldb::OptionValueSP
OptionValueDictionary::GetValueForKey(const ConstString &key) const {
OptionValueDictionary::GetValueForKey(ConstString key) const {
lldb::OptionValueSP value_sp;
collection::const_iterator pos = m_values.find(key);
if (pos != m_values.end())
@ -284,7 +284,7 @@ OptionValueDictionary::GetValueForKey(const ConstString &key) const {
return value_sp;
}
bool OptionValueDictionary::SetValueForKey(const ConstString &key,
bool OptionValueDictionary::SetValueForKey(ConstString key,
const lldb::OptionValueSP &value_sp,
bool can_replace) {
// Make sure the value_sp object is allowed to contain values of the type
@ -301,7 +301,7 @@ bool OptionValueDictionary::SetValueForKey(const ConstString &key,
return false;
}
bool OptionValueDictionary::DeleteValueForKey(const ConstString &key) {
bool OptionValueDictionary::DeleteValueForKey(ConstString key) {
collection::iterator pos = m_values.find(key);
if (pos != m_values.end()) {
m_values.erase(pos);

Some files were not shown because too many files have changed in this diff Show More