Index: lldb/trunk/docs/structured_data/StructuredDataPlugins.md =================================================================== --- lldb/trunk/docs/structured_data/StructuredDataPlugins.md +++ lldb/trunk/docs/structured_data/StructuredDataPlugins.md @@ -35,7 +35,7 @@ ```C++ virtual Error - ConfigureStructuredData(const ConstString &type_name, + ConfigureStructuredData(ConstString type_name, const StructuredData::ObjectSP &config_sp) ``` @@ -110,7 +110,7 @@ ```C++ virtual Error - ConfigureStructuredData(const ConstString &type_name, + ConfigureStructuredData(ConstString type_name, const StructuredData::ObjectSP &config_sp) ``` Index: lldb/trunk/include/lldb/Breakpoint/Breakpoint.h =================================================================== --- lldb/trunk/include/lldb/Breakpoint/Breakpoint.h +++ lldb/trunk/include/lldb/Breakpoint/Breakpoint.h @@ -82,7 +82,7 @@ class Breakpoint : public std::enable_shared_from_this, 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 @@ ~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 @@ /// 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); Index: lldb/trunk/include/lldb/Breakpoint/BreakpointName.h =================================================================== --- lldb/trunk/include/lldb/Breakpoint/BreakpointName.h +++ lldb/trunk/include/lldb/Breakpoint/BreakpointName.h @@ -136,13 +136,13 @@ } }; - 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 @@ 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; } Index: lldb/trunk/include/lldb/Breakpoint/BreakpointResolverName.h =================================================================== --- lldb/trunk/include/lldb/Breakpoint/BreakpointResolverName.h +++ lldb/trunk/include/lldb/Breakpoint/BreakpointResolverName.h @@ -87,7 +87,7 @@ lldb::LanguageType m_language; bool m_skip_prologue; - void AddNameLookup(const ConstString &name, + void AddNameLookup(ConstString name, lldb::FunctionNameType name_type_mask); }; Index: lldb/trunk/include/lldb/Breakpoint/Watchpoint.h =================================================================== --- lldb/trunk/include/lldb/Breakpoint/Watchpoint.h +++ lldb/trunk/include/lldb/Breakpoint/Watchpoint.h @@ -31,9 +31,9 @@ ~WatchpointEventData() override; - static const ConstString &GetFlavorString(); + static ConstString GetFlavorString(); - const ConstString &GetFlavor() const override; + ConstString GetFlavor() const override; lldb::WatchpointEventType GetWatchpointEventType() const; Index: lldb/trunk/include/lldb/Core/Debugger.h =================================================================== --- lldb/trunk/include/lldb/Core/Debugger.h +++ lldb/trunk/include/lldb/Core/Debugger.h @@ -110,7 +110,7 @@ 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 @@ bool GetNotifyVoid() const; - const ConstString &GetInstanceName() { return m_instance_name; } + ConstString GetInstanceName() { return m_instance_name; } bool LoadPlugin(const FileSpec &spec, Status &error); Index: lldb/trunk/include/lldb/Core/Disassembler.h =================================================================== --- lldb/trunk/include/lldb/Core/Disassembler.h +++ lldb/trunk/include/lldb/Core/Disassembler.h @@ -413,7 +413,7 @@ 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); Index: lldb/trunk/include/lldb/Core/Mangled.h =================================================================== --- lldb/trunk/include/lldb/Core/Mangled.h +++ lldb/trunk/include/lldb/Core/Mangled.h @@ -68,7 +68,7 @@ /// 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 @@ /// @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 @@ /// @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 @@ //---------------------------------------------------------------------- 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 @@ /// @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 @@ /// @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 @@ /// 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 @@ /// @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. Index: lldb/trunk/include/lldb/Core/Module.h =================================================================== --- lldb/trunk/include/lldb/Core/Module.h +++ lldb/trunk/include/lldb/Core/Module.h @@ -293,10 +293,10 @@ /// 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 @@ /// @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 @@ /// @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 @@ /// @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 @@ /// 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 &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 @@ /// @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 @@ 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 @@ 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 @@ 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 @@ 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 &searched_symbol_files, TypeMap &types); Index: lldb/trunk/include/lldb/Core/ModuleList.h =================================================================== --- lldb/trunk/include/lldb/Core/ModuleList.h +++ lldb/trunk/include/lldb/Core/ModuleList.h @@ -299,7 +299,7 @@ //------------------------------------------------------------------ /// @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 @@ //------------------------------------------------------------------ /// @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 @@ /// @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 @@ 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 @@ /// @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 &searched_symbol_files, TypeList &types) const; Index: lldb/trunk/include/lldb/Core/ModuleSpec.h =================================================================== --- lldb/trunk/include/lldb/Core/ModuleSpec.h +++ lldb/trunk/include/lldb/Core/ModuleSpec.h @@ -124,7 +124,7 @@ 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; } Index: lldb/trunk/include/lldb/Core/PluginManager.h =================================================================== --- lldb/trunk/include/lldb/Core/PluginManager.h +++ lldb/trunk/include/lldb/Core/PluginManager.h @@ -43,7 +43,7 @@ //------------------------------------------------------------------ // 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 @@ static ABICreateInstance GetABICreateCallbackAtIndex(uint32_t idx); static ABICreateInstance - GetABICreateCallbackForPluginName(const ConstString &name); + GetABICreateCallbackForPluginName(ConstString name); //------------------------------------------------------------------ // Architecture @@ -59,7 +59,7 @@ using ArchitectureCreateInstance = std::unique_ptr (*)(const ArchSpec &); - static void RegisterPlugin(const ConstString &name, + static void RegisterPlugin(ConstString name, llvm::StringRef description, ArchitectureCreateInstance create_callback); @@ -71,7 +71,7 @@ //------------------------------------------------------------------ // 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ // 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 @@ GetObjectContainerCreateCallbackAtIndex(uint32_t idx); static ObjectContainerCreateInstance - GetObjectContainerCreateCallbackForPluginName(const ConstString &name); + GetObjectContainerCreateCallbackForPluginName(ConstString name); static ObjectFileGetModuleSpecifications GetObjectContainerGetModuleSpecificationsCallbackAtIndex(uint32_t idx); @@ -243,7 +243,7 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ //------------------------------------------------------------------ // 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 @@ /// 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 @@ GetStructuredDataPluginCreateCallbackAtIndex(uint32_t idx); static StructuredDataPluginCreateInstance - GetStructuredDataPluginCreateCallbackForPluginName(const ConstString &name); + GetStructuredDataPluginCreateCallbackForPluginName(ConstString name); static StructuredDataFilterLaunchInfo GetStructuredDataFilterCallbackAtIndex(uint32_t idx, @@ -356,7 +356,7 @@ // 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 Index: lldb/trunk/include/lldb/Core/RichManglingContext.h =================================================================== --- lldb/trunk/include/lldb/Core/RichManglingContext.h +++ lldb/trunk/include/lldb/Core/RichManglingContext.h @@ -33,11 +33,11 @@ /// 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; Index: lldb/trunk/include/lldb/Core/Section.h =================================================================== --- lldb/trunk/include/lldb/Core/Section.h +++ lldb/trunk/include/lldb/Core/Section.h @@ -67,7 +67,7 @@ void Dump(Stream *s, Target *target, bool show_header, uint32_t depth) const; - lldb::SectionSP FindSectionByName(const ConstString §ion_dstr) const; + lldb::SectionSP FindSectionByName(ConstString section_dstr) const; lldb::SectionSP FindSectionByID(lldb::user_id_t sect_id) const; @@ -109,7 +109,7 @@ 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 @@ // 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 @@ 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); Index: lldb/trunk/include/lldb/Core/UserSettingsController.h =================================================================== --- lldb/trunk/include/lldb/Core/UserSettingsController.h +++ lldb/trunk/include/lldb/Core/UserSettingsController.h @@ -77,7 +77,7 @@ std::vector &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 Index: lldb/trunk/include/lldb/Core/ValueObject.h =================================================================== --- lldb/trunk/include/lldb/Core/ValueObject.h +++ lldb/trunk/include/lldb/Core/ValueObject.h @@ -483,7 +483,7 @@ //------------------------------------------------------------------ const Status &GetError(); - const ConstString &GetName() const; + ConstString GetName() const; virtual lldb::ValueObjectSP GetChildAtIndex(size_t idx, bool can_create); @@ -503,10 +503,10 @@ GetChildAtNamePath(llvm::ArrayRef> 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 @@ // 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 @@ 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 @@ // 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 @@ void ClearUserVisibleData( uint32_t items = ValueObject::eClearUserVisibleDataItemsAllStrings); - void AddSyntheticChild(const ConstString &key, ValueObject *valobj); + void AddSyntheticChild(ConstString key, ValueObject *valobj); DataExtractor &GetDataExtractor(); Index: lldb/trunk/include/lldb/Core/ValueObjectCast.h =================================================================== --- lldb/trunk/include/lldb/Core/ValueObjectCast.h +++ lldb/trunk/include/lldb/Core/ValueObjectCast.h @@ -32,7 +32,7 @@ ~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 @@ } protected: - ValueObjectCast(ValueObject &parent, const ConstString &name, + ValueObjectCast(ValueObject &parent, ConstString name, const CompilerType &cast_type); bool UpdateValue() override; Index: lldb/trunk/include/lldb/Core/ValueObjectChild.h =================================================================== --- lldb/trunk/include/lldb/Core/ValueObjectChild.h +++ lldb/trunk/include/lldb/Core/ValueObjectChild.h @@ -83,7 +83,7 @@ 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, Index: lldb/trunk/include/lldb/Core/ValueObjectConstResult.h =================================================================== --- lldb/trunk/include/lldb/Core/ValueObjectConstResult.h +++ lldb/trunk/include/lldb/Core/ValueObjectConstResult.h @@ -48,22 +48,22 @@ 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 @@ 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); Index: lldb/trunk/include/lldb/Core/ValueObjectConstResultCast.h =================================================================== --- lldb/trunk/include/lldb/Core/ValueObjectConstResultCast.h +++ lldb/trunk/include/lldb/Core/ValueObjectConstResultCast.h @@ -34,7 +34,7 @@ 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); Index: lldb/trunk/include/lldb/Core/ValueObjectConstResultChild.h =================================================================== --- lldb/trunk/include/lldb/Core/ValueObjectConstResultChild.h +++ lldb/trunk/include/lldb/Core/ValueObjectConstResultChild.h @@ -38,7 +38,7 @@ 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, Index: lldb/trunk/include/lldb/Core/ValueObjectRegister.h =================================================================== --- lldb/trunk/include/lldb/Core/ValueObjectRegister.h +++ lldb/trunk/include/lldb/Core/ValueObjectRegister.h @@ -103,10 +103,10 @@ 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; Index: lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h =================================================================== --- lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h +++ lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h @@ -62,10 +62,10 @@ 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; Index: lldb/trunk/include/lldb/DataFormatters/DataVisualization.h =================================================================== --- lldb/trunk/include/lldb/DataFormatters/DataVisualization.h +++ lldb/trunk/include/lldb/DataFormatters/DataVisualization.h @@ -75,13 +75,13 @@ 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 @@ 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); Index: lldb/trunk/include/lldb/DataFormatters/FormatCache.h =================================================================== --- lldb/trunk/include/lldb/DataFormatters/FormatCache.h +++ lldb/trunk/include/lldb/DataFormatters/FormatCache.h @@ -71,29 +71,29 @@ 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(); Index: lldb/trunk/include/lldb/DataFormatters/FormatManager.h =================================================================== --- lldb/trunk/include/lldb/DataFormatters/FormatManager.h +++ lldb/trunk/include/lldb/DataFormatters/FormatManager.h @@ -50,19 +50,19 @@ } void - EnableCategory(const ConstString &category_name, + EnableCategory(ConstString category_name, TypeCategoryMap::Position pos = TypeCategoryMap::Default) { EnableCategory(category_name, pos, std::initializer_list()); } - void EnableCategory(const ConstString &category_name, + void EnableCategory(ConstString category_name, TypeCategoryMap::Position pos, lldb::LanguageType lang) { std::initializer_list 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 langs = {}) { TypeCategoryMap::ValueSP category_sp; @@ -73,7 +73,7 @@ } } - void DisableCategory(const ConstString &category_name) { + void DisableCategory(ConstString category_name) { m_categories_map.Disable(category_name); } @@ -91,7 +91,7 @@ void DisableAllCategories(); - bool DeleteCategory(const ConstString &category_name) { + bool DeleteCategory(ConstString category_name) { return m_categories_map.Delete(category_name); } @@ -112,7 +112,7 @@ 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 @@ // 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 Index: lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h =================================================================== --- lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h +++ lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h @@ -42,7 +42,7 @@ // 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 @@ 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); } Index: lldb/trunk/include/lldb/DataFormatters/TypeSynthetic.h =================================================================== --- lldb/trunk/include/lldb/DataFormatters/TypeSynthetic.h +++ lldb/trunk/include/lldb/DataFormatters/TypeSynthetic.h @@ -47,7 +47,7 @@ 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 @@ 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 @@ bool MightHaveChildren() override { return filter->GetCount() > 0; } - size_t GetIndexOfChildWithName(const ConstString &name) override; + size_t GetIndexOfChildWithName(ConstString name) override; typedef std::shared_ptr SharedPointer; @@ -424,7 +424,7 @@ bool MightHaveChildren() override; - size_t GetIndexOfChildWithName(const ConstString &name) override; + size_t GetIndexOfChildWithName(ConstString name) override; lldb::ValueObjectSP GetSyntheticValue() override; Index: lldb/trunk/include/lldb/DataFormatters/VectorIterator.h =================================================================== --- lldb/trunk/include/lldb/DataFormatters/VectorIterator.h +++ lldb/trunk/include/lldb/DataFormatters/VectorIterator.h @@ -31,7 +31,7 @@ bool MightHaveChildren() override; - size_t GetIndexOfChildWithName(const ConstString &name) override; + size_t GetIndexOfChildWithName(ConstString name) override; private: ExecutionContextRef m_exe_ctx_ref; Index: lldb/trunk/include/lldb/Expression/ExpressionVariable.h =================================================================== --- lldb/trunk/include/lldb/Expression/ExpressionVariable.h +++ lldb/trunk/include/lldb/Expression/ExpressionVariable.h @@ -38,7 +38,7 @@ 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 @@ 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 @@ /// 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 @@ 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 @@ 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); Index: lldb/trunk/include/lldb/Expression/IRExecutionUnit.h =================================================================== --- lldb/trunk/include/lldb/Expression/IRExecutionUnit.h +++ lldb/trunk/include/lldb/Expression/IRExecutionUnit.h @@ -111,7 +111,7 @@ lldb::ModuleSP GetJITModule(); - lldb::addr_t FindSymbol(const ConstString &name); + lldb::addr_t FindSymbol(ConstString name); void GetStaticInitializers(std::vector &static_initializers); @@ -240,7 +240,7 @@ struct SearchSpec; void CollectCandidateCNames(std::vector &C_specs, - const ConstString &name); + ConstString name); void CollectCandidateCPlusPlusNames(std::vector &CPP_specs, const std::vector &C_specs, @@ -258,7 +258,7 @@ lldb::addr_t FindInUserDefinedSymbols(const std::vector &specs, const lldb_private::SymbolContext &sc); - void ReportSymbolLookupError(const ConstString &name); + void ReportSymbolLookupError(ConstString name); class MemoryManager : public llvm::SectionMemoryManager { public: Index: lldb/trunk/include/lldb/Interpreter/OptionGroupPlatform.h =================================================================== --- lldb/trunk/include/lldb/Interpreter/OptionGroupPlatform.h +++ lldb/trunk/include/lldb/Interpreter/OptionGroupPlatform.h @@ -50,15 +50,15 @@ 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; Index: lldb/trunk/include/lldb/Interpreter/OptionValueDictionary.h =================================================================== --- lldb/trunk/include/lldb/Interpreter/OptionValueDictionary.h +++ lldb/trunk/include/lldb/Interpreter/OptionValueDictionary.h @@ -57,7 +57,7 @@ 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 @@ 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; Index: lldb/trunk/include/lldb/Interpreter/OptionValueProperties.h =================================================================== --- lldb/trunk/include/lldb/Interpreter/OptionValueProperties.h +++ lldb/trunk/include/lldb/Interpreter/OptionValueProperties.h @@ -26,7 +26,7 @@ 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 @@ // 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 @@ //--------------------------------------------------------------------- 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 @@ 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 @@ 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, Index: lldb/trunk/include/lldb/Interpreter/Property.h =================================================================== --- lldb/trunk/include/lldb/Interpreter/Property.h +++ lldb/trunk/include/lldb/Interpreter/Property.h @@ -37,7 +37,7 @@ 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(); } Index: lldb/trunk/include/lldb/Symbol/ClangASTContext.h =================================================================== --- lldb/trunk/include/lldb/Symbol/ClangASTContext.h +++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h @@ -168,9 +168,9 @@ 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 @@ template CompilerType - GetTypeForIdentifier(const ConstString &type_name, + GetTypeForIdentifier(ConstString type_name, clang::DeclContext *decl_context = nullptr) { CompilerType compiler_type; @@ -243,13 +243,13 @@ } CompilerType CreateStructForIdentifier( - const ConstString &type_name, + ConstString type_name, const std::initializer_list> &type_fields, bool packed = false); CompilerType GetOrCreateStructForIdentifier( - const ConstString &type_name, + ConstString type_name, const std::initializer_list> &type_fields, bool packed = false); @@ -747,19 +747,19 @@ 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 const &callback) override; uint32_t GetNumFields(lldb::opaque_compiler_type_t type) override; Index: lldb/trunk/include/lldb/Symbol/ClangASTImporter.h =================================================================== --- lldb/trunk/include/lldb/Symbol/ClangASTImporter.h +++ lldb/trunk/include/lldb/Symbol/ClangASTImporter.h @@ -187,7 +187,7 @@ virtual ~MapCompleter(); virtual void CompleteNamespaceMap(NamespaceMapSP &namespace_map, - const ConstString &name, + ConstString name, NamespaceMapSP &parent_map) const = 0; }; Index: lldb/trunk/include/lldb/Symbol/CompilerType.h =================================================================== --- lldb/trunk/include/lldb/Symbol/CompilerType.h +++ lldb/trunk/include/lldb/Symbol/CompilerType.h @@ -302,7 +302,7 @@ 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 @@ //---------------------------------------------------------------------- void ForEachEnumerator( std::function const &callback) const; uint32_t GetNumFields() const; Index: lldb/trunk/include/lldb/Symbol/DeclVendor.h =================================================================== --- lldb/trunk/include/lldb/Symbol/DeclVendor.h +++ lldb/trunk/include/lldb/Symbol/DeclVendor.h @@ -49,7 +49,7 @@ /// 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 &decls) = 0; Index: lldb/trunk/include/lldb/Symbol/Function.h =================================================================== --- lldb/trunk/include/lldb/Symbol/Function.h +++ lldb/trunk/include/lldb/Symbol/Function.h @@ -55,7 +55,7 @@ /// 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 @@ /// 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); Index: lldb/trunk/include/lldb/Symbol/Symbol.h =================================================================== --- lldb/trunk/include/lldb/Symbol/Symbol.h +++ lldb/trunk/include/lldb/Symbol/Symbol.h @@ -42,7 +42,7 @@ 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 @@ FileSpec GetReExportedSymbolSharedLibrary() const; - void SetReExportedSymbolName(const ConstString &name); + void SetReExportedSymbolName(ConstString name); bool SetReExportedSymbolSharedLibrary(const FileSpec &fspec); Index: lldb/trunk/include/lldb/Symbol/SymbolContext.h =================================================================== --- lldb/trunk/include/lldb/Symbol/SymbolContext.h +++ lldb/trunk/include/lldb/Symbol/SymbolContext.h @@ -249,7 +249,7 @@ /// @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; Index: lldb/trunk/include/lldb/Symbol/SymbolFile.h =================================================================== --- lldb/trunk/include/lldb/Symbol/SymbolFile.h +++ lldb/trunk/include/lldb/Symbol/SymbolFile.h @@ -178,13 +178,13 @@ 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 ®ex, 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 @@ 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 &searched_symbol_files, TypeMap &types); @@ -217,7 +217,7 @@ GetTypeSystemForLanguage(lldb::LanguageType language); virtual CompilerDeclContext - FindNamespace(const ConstString &name, + FindNamespace(ConstString name, const CompilerDeclContext *parent_decl_ctx) { return CompilerDeclContext(); } Index: lldb/trunk/include/lldb/Symbol/SymbolVendor.h =================================================================== --- lldb/trunk/include/lldb/Symbol/SymbolVendor.h +++ lldb/trunk/include/lldb/Symbol/SymbolVendor.h @@ -80,7 +80,7 @@ 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 @@ 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 @@ 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 &searched_symbol_files, TypeMap &types); @@ -109,7 +109,7 @@ bool append, TypeMap &types); virtual CompilerDeclContext - FindNamespace(const ConstString &name, + FindNamespace(ConstString name, const CompilerDeclContext *parent_decl_ctx); virtual size_t GetNumCompileUnits(); Index: lldb/trunk/include/lldb/Symbol/Symtab.h =================================================================== --- lldb/trunk/include/lldb/Symbol/Symtab.h +++ lldb/trunk/include/lldb/Symbol/Symtab.h @@ -76,16 +76,16 @@ std::vector &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 &matches); - uint32_t AppendSymbolIndexesWithName(const ConstString &symbol_name, + uint32_t AppendSymbolIndexesWithName(ConstString symbol_name, Debug symbol_debug_type, Visibility symbol_visibility, std::vector &matches); - uint32_t AppendSymbolIndexesWithNameAndType(const ConstString &symbol_name, + uint32_t AppendSymbolIndexesWithNameAndType(ConstString symbol_name, lldb::SymbolType symbol_type, std::vector &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 @@ const RegularExpression ®ex, lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector &indexes); - size_t FindAllSymbolsWithNameAndType(const ConstString &name, + size_t FindAllSymbolsWithNameAndType(ConstString name, lldb::SymbolType symbol_type, std::vector &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 @@ const RegularExpression ®ex, lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector &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 @@ Symbol *FindSymbolContainingFileAddress(lldb::addr_t file_addr); void ForEachSymbolContainingFileAddress( lldb::addr_t file_addr, std::function 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(); Index: lldb/trunk/include/lldb/Symbol/Type.h =================================================================== --- lldb/trunk/include/lldb/Symbol/Type.h +++ lldb/trunk/include/lldb/Symbol/Type.h @@ -27,7 +27,7 @@ // 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 @@ 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 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 @@ TypeList *GetTypeList(); - const ConstString &GetName(); + ConstString GetName(); llvm::Optional GetByteSize(); @@ -139,7 +139,7 @@ lldb::TypeSP GetTypedefType(); - const ConstString &GetName() const { return m_name; } + ConstString GetName() const { return m_name; } ConstString GetQualifiedName(); @@ -478,7 +478,7 @@ {} 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 @@ 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 @@ 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 @@ : m_integer_type_sp(), m_name(""), 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 @@ 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; } Index: lldb/trunk/include/lldb/Symbol/TypeList.h =================================================================== --- lldb/trunk/include/lldb/Symbol/TypeList.h +++ lldb/trunk/include/lldb/Symbol/TypeList.h @@ -33,7 +33,7 @@ // lldb::TypeSP // FindType(lldb::user_id_t uid); - TypeList FindTypes(const ConstString &name); + TypeList FindTypes(ConstString name); void Insert(const lldb::TypeSP &type); Index: lldb/trunk/include/lldb/Symbol/TypeMap.h =================================================================== --- lldb/trunk/include/lldb/Symbol/TypeMap.h +++ lldb/trunk/include/lldb/Symbol/TypeMap.h @@ -30,7 +30,7 @@ void Dump(Stream *s, bool show_context); - TypeMap FindTypes(const ConstString &name); + TypeMap FindTypes(ConstString name); void Insert(const lldb::TypeSP &type); Index: lldb/trunk/include/lldb/Symbol/TypeSystem.h =================================================================== --- lldb/trunk/include/lldb/Symbol/TypeSystem.h +++ lldb/trunk/include/lldb/Symbol/TypeSystem.h @@ -283,7 +283,7 @@ 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 @@ virtual void ForEachEnumerator( lldb::opaque_compiler_type_t type, std::function const &callback) {} virtual uint32_t GetNumFields(lldb::opaque_compiler_type_t type) = 0; Index: lldb/trunk/include/lldb/Symbol/Variable.h =================================================================== --- lldb/trunk/include/lldb/Symbol/Variable.h +++ lldb/trunk/include/lldb/Symbol/Variable.h @@ -57,7 +57,7 @@ // 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 ®ex) const; Index: lldb/trunk/include/lldb/Symbol/VariableList.h =================================================================== --- lldb/trunk/include/lldb/Symbol/VariableList.h +++ lldb/trunk/include/lldb/Symbol/VariableList.h @@ -38,10 +38,10 @@ 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); Index: lldb/trunk/include/lldb/Target/ABI.h =================================================================== --- lldb/trunk/include/lldb/Target/ABI.h +++ lldb/trunk/include/lldb/Target/ABI.h @@ -128,7 +128,7 @@ 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); Index: lldb/trunk/include/lldb/Target/MemoryRegionInfo.h =================================================================== --- lldb/trunk/include/lldb/Target/MemoryRegionInfo.h +++ lldb/trunk/include/lldb/Target/MemoryRegionInfo.h @@ -44,7 +44,7 @@ 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; } Index: lldb/trunk/include/lldb/Target/ObjCLanguageRuntime.h =================================================================== --- lldb/trunk/include/lldb/Target/ObjCLanguageRuntime.h +++ lldb/trunk/include/lldb/Target/ObjCLanguageRuntime.h @@ -200,7 +200,7 @@ 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 @@ } } - virtual ObjCISA GetISA(const ConstString &name); + virtual ObjCISA GetISA(ConstString name); virtual ConstString GetActualTypeName(ObjCISA isa); @@ -270,7 +270,7 @@ // 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 @@ 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 @@ CompleteClassSet; CompleteClassSet m_negative_complete_class_cache; - ISAToDescriptorIterator GetDescriptorIterator(const ConstString &name); + ISAToDescriptorIterator GetDescriptorIterator(ConstString name); friend class ::CommandObjectObjC_ClassTable_Dump; Index: lldb/trunk/include/lldb/Target/PathMappingList.h =================================================================== --- lldb/trunk/include/lldb/Target/PathMappingList.h +++ lldb/trunk/include/lldb/Target/PathMappingList.h @@ -34,7 +34,7 @@ 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 @@ 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 @@ //------------------------------------------------------------------ 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 @@ 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; Index: lldb/trunk/include/lldb/Target/Platform.h =================================================================== --- lldb/trunk/include/lldb/Target/Platform.h +++ lldb/trunk/include/lldb/Target/Platform.h @@ -108,9 +108,9 @@ 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 @@ /// 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 @@ // 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 Index: lldb/trunk/include/lldb/Target/Process.h =================================================================== --- lldb/trunk/include/lldb/Target/Process.h +++ lldb/trunk/include/lldb/Target/Process.h @@ -449,9 +449,9 @@ ~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 @@ /// 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 @@ /// 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 @@ /// /// virtual void /// HandleArrivalOfStructuredData(Process &process, - /// const ConstString &type_name, + /// ConstString type_name, /// const StructuredData::ObjectSP /// &object_sp) /// Index: lldb/trunk/include/lldb/Target/StackFrameRecognizer.h =================================================================== --- lldb/trunk/include/lldb/Target/StackFrameRecognizer.h +++ lldb/trunk/include/lldb/Target/StackFrameRecognizer.h @@ -100,8 +100,8 @@ 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, Index: lldb/trunk/include/lldb/Target/StructuredDataPlugin.h =================================================================== --- lldb/trunk/include/lldb/Target/StructuredDataPlugin.h +++ lldb/trunk/include/lldb/Target/StructuredDataPlugin.h @@ -70,7 +70,7 @@ /// @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 @@ /// 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 @@ /// 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 Index: lldb/trunk/include/lldb/Target/Target.h =================================================================== --- lldb/trunk/include/lldb/Target/Target.h +++ lldb/trunk/include/lldb/Target/Target.h @@ -462,9 +462,9 @@ ~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 @@ 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 @@ 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 Index: lldb/trunk/include/lldb/Target/Thread.h =================================================================== --- lldb/trunk/include/lldb/Target/Thread.h +++ lldb/trunk/include/lldb/Target/Thread.h @@ -91,9 +91,9 @@ ~ThreadEventData() override; - static const ConstString &GetFlavorString(); + static ConstString GetFlavorString(); - const ConstString &GetFlavor() const override { + ConstString GetFlavor() const override { return ThreadEventData::GetFlavorString(); } Index: lldb/trunk/include/lldb/Utility/ArchSpec.h =================================================================== --- lldb/trunk/include/lldb/Utility/ArchSpec.h +++ lldb/trunk/include/lldb/Utility/ArchSpec.h @@ -351,7 +351,7 @@ /// @return A ConstString ref containing the distribution id, /// potentially empty. //------------------------------------------------------------------ - const ConstString &GetDistributionId() const; + ConstString GetDistributionId() const; //------------------------------------------------------------------ /// Set the distribution id of the architecture. Index: lldb/trunk/include/lldb/Utility/Broadcaster.h =================================================================== --- lldb/trunk/include/lldb/Utility/Broadcaster.h +++ lldb/trunk/include/lldb/Utility/Broadcaster.h @@ -47,14 +47,14 @@ //---------------------------------------------------------------------- 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 @@ class BroadcasterClassMatches { public: - BroadcasterClassMatches(const ConstString &broadcaster_class) + BroadcasterClassMatches(ConstString broadcaster_class) : m_broadcaster_class(broadcaster_class) {} ~BroadcasterClassMatches() = default; @@ -351,7 +351,7 @@ /// @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. Index: lldb/trunk/include/lldb/Utility/ConstString.h =================================================================== --- lldb/trunk/include/lldb/Utility/ConstString.h +++ lldb/trunk/include/lldb/Utility/ConstString.h @@ -151,7 +151,7 @@ /// @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 @@ /// @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 @@ /// @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 @@ /// @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 @@ /// @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 @@ /// 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 @@ //------------------------------------------------------------------ /// 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 Index: lldb/trunk/include/lldb/Utility/Event.h =================================================================== --- lldb/trunk/include/lldb/Utility/Event.h +++ lldb/trunk/include/lldb/Utility/Event.h @@ -45,7 +45,7 @@ virtual ~EventData(); - virtual const ConstString &GetFlavor() const = 0; + virtual ConstString GetFlavor() const = 0; virtual void Dump(Stream *s) const; @@ -76,7 +76,7 @@ //------------------------------------------------------------------ // Member functions //------------------------------------------------------------------ - const ConstString &GetFlavor() const override; + ConstString GetFlavor() const override; void Dump(Stream *s) const override; @@ -99,7 +99,7 @@ static size_t GetByteSizeFromEvent(const Event *event_ptr); - static const ConstString &GetFlavorString(); + static ConstString GetFlavorString(); private: std::string m_bytes; @@ -113,12 +113,12 @@ ~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 &timeout = llvm::None) { return m_predicate.WaitForValueEqualTo(true, timeout); @@ -153,7 +153,7 @@ //------------------------------------------------------------------ // Member functions //------------------------------------------------------------------ - const ConstString &GetFlavor() const override; + ConstString GetFlavor() const override; void Dump(Stream *s) const override; @@ -182,7 +182,7 @@ static lldb::StructuredDataPluginSP GetPluginFromEvent(const Event *event_ptr); - static const ConstString &GetFlavorString(); + static ConstString GetFlavorString(); private: lldb::ProcessSP m_process_sp; Index: lldb/trunk/include/lldb/Utility/FileSpec.h =================================================================== --- lldb/trunk/include/lldb/Utility/FileSpec.h +++ lldb/trunk/include/lldb/Utility/FileSpec.h @@ -286,7 +286,7 @@ /// @return /// A const reference to the directory string object. //------------------------------------------------------------------ - const ConstString &GetDirectory() const; + ConstString GetDirectory() const; //------------------------------------------------------------------ /// Filename string get accessor. @@ -302,7 +302,7 @@ /// @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 Index: lldb/trunk/include/lldb/Utility/Log.h =================================================================== --- lldb/trunk/include/lldb/Utility/Log.h +++ lldb/trunk/include/lldb/Utility/Log.h @@ -115,7 +115,8 @@ llvm::ArrayRef 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(); Index: lldb/trunk/source/API/SBType.cpp =================================================================== --- lldb/trunk/source/API/SBType.cpp +++ lldb/trunk/source/API/SBType.cpp @@ -434,7 +434,7 @@ 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( Index: lldb/trunk/source/Breakpoint/Breakpoint.cpp =================================================================== --- lldb/trunk/source/Breakpoint/Breakpoint.cpp +++ lldb/trunk/source/Breakpoint/Breakpoint.cpp @@ -35,7 +35,7 @@ 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 @@ 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() = 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(); } Index: lldb/trunk/source/Breakpoint/BreakpointName.cpp =================================================================== --- lldb/trunk/source/Breakpoint/BreakpointName.cpp +++ lldb/trunk/source/Breakpoint/BreakpointName.cpp @@ -28,7 +28,7 @@ (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()) { Index: lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp =================================================================== --- lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp +++ lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp @@ -217,7 +217,7 @@ 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)) { Index: lldb/trunk/source/Breakpoint/Watchpoint.cpp =================================================================== --- lldb/trunk/source/Breakpoint/Watchpoint.cpp +++ lldb/trunk/source/Breakpoint/Watchpoint.cpp @@ -325,12 +325,12 @@ 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(); } Index: lldb/trunk/source/Commands/CommandObjectSource.cpp =================================================================== --- lldb/trunk/source/Commands/CommandObjectSource.cpp +++ lldb/trunk/source/Commands/CommandObjectSource.cpp @@ -194,7 +194,7 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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(); Index: lldb/trunk/source/Commands/CommandObjectType.cpp =================================================================== --- lldb/trunk/source/Commands/CommandObjectType.cpp +++ lldb/trunk/source/Commands/CommandObjectType.cpp @@ -52,7 +52,7 @@ 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 SharedPointer; Index: lldb/trunk/source/Core/Debugger.cpp =================================================================== --- lldb/trunk/source/Core/Debugger.cpp +++ lldb/trunk/source/Core/Debugger.cpp @@ -711,7 +711,7 @@ } 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 guard(*g_debugger_list_mutex_ptr); Index: lldb/trunk/source/Core/Disassembler.cpp =================================================================== --- lldb/trunk/source/Core/Disassembler.cpp +++ lldb/trunk/source/Core/Disassembler.cpp @@ -161,7 +161,7 @@ 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, Index: lldb/trunk/source/Core/Mangled.cpp =================================================================== --- lldb/trunk/source/Core/Mangled.cpp +++ lldb/trunk/source/Core/Mangled.cpp @@ -72,7 +72,7 @@ return cstring_mangling_scheme(s) != Mangled::eManglingSchemeNone; } -static const ConstString & +static ConstString get_demangled_name_without_arguments(ConstString mangled, ConstString demangled) { // This pair is @@ -133,7 +133,7 @@ // 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 @@ 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 @@ // 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 &name) { +void Mangled::SetValue(ConstString name) { if (name) { if (cstring_is_mangled(name.GetCString())) { m_demangled.Clear(); @@ -362,7 +362,7 @@ // 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 @@ if (obj.GetMangledName()) s << "mangled = '" << obj.GetMangledName() << "'"; - const ConstString &demangled = + ConstString demangled = obj.GetDemangledName(lldb::eLanguageTypeUnknown); if (demangled) s << ", demangled = '" << demangled << '\''; Index: lldb/trunk/source/Core/Module.cpp =================================================================== --- lldb/trunk/source/Core/Module.cpp +++ lldb/trunk/source/Core/Module.cpp @@ -598,7 +598,7 @@ 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 @@ 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 @@ } } -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 @@ } 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 &searched_symbol_files, TypeMap &types) { @@ -959,7 +959,7 @@ 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 @@ } lldb::TypeSP Module::FindFirstType(const SymbolContext &sc, - const ConstString &name, bool exact_match) { + ConstString name, bool exact_match) { TypeList type_list; llvm::DenseSet searched_symbol_files; const size_t num_matches = @@ -988,7 +988,7 @@ } 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 &searched_symbol_files, TypeList &types) { size_t num_matches = 0; @@ -1063,7 +1063,7 @@ } 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 @@ 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 @@ 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 @@ } } -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 @@ 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 @@ return false; } - const ConstString &object_name = module_ref.GetObjectName(); + ConstString object_name = module_ref.GetObjectName(); if (object_name) { if (object_name != GetObjectName()) return false; Index: lldb/trunk/source/Core/ModuleList.cpp =================================================================== --- lldb/trunk/source/Core/ModuleList.cpp +++ lldb/trunk/source/Core/ModuleList.cpp @@ -344,7 +344,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ } 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 &searched_symbol_files, TypeList &types) const { Index: lldb/trunk/source/Core/PluginManager.cpp =================================================================== --- lldb/trunk/source/Core/PluginManager.cpp +++ lldb/trunk/source/Core/PluginManager.cpp @@ -219,7 +219,7 @@ 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::GetABICreateCallbackForPluginName(const ConstString &name) { +PluginManager::GetABICreateCallbackForPluginName(ConstString name) { if (name) { std::lock_guard guard(GetABIInstancesMutex()); ABIInstances &instances = GetABIInstances(); @@ -295,7 +295,7 @@ return g_instances; } -void PluginManager::RegisterPlugin(const ConstString &name, +void PluginManager::RegisterPlugin(ConstString name, llvm::StringRef description, ArchitectureCreateInstance create_callback) { std::lock_guard guard(GetArchitectureMutex()); @@ -348,7 +348,7 @@ 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 @@ DisassemblerCreateInstance PluginManager::GetDisassemblerCreateCallbackForPluginName( - const ConstString &name) { + ConstString name) { if (name) { std::lock_guard guard(GetDisassemblerMutex()); DisassemblerInstances &instances = GetDisassemblerInstances(); @@ -433,7 +433,7 @@ } 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 @@ DynamicLoaderCreateInstance PluginManager::GetDynamicLoaderCreateCallbackForPluginName( - const ConstString &name) { + ConstString name) { if (name) { std::lock_guard guard(GetDynamicLoaderMutex()); DynamicLoaderInstances &instances = GetDynamicLoaderInstances(); @@ -518,7 +518,7 @@ } 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 @@ } JITLoaderCreateInstance PluginManager::GetJITLoaderCreateCallbackForPluginName( - const ConstString &name) { + ConstString name) { if (name) { std::lock_guard guard(GetJITLoaderMutex()); JITLoaderInstances &instances = GetJITLoaderInstances(); @@ -599,7 +599,7 @@ } 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 @@ EmulateInstructionCreateInstance PluginManager::GetEmulateInstructionCreateCallbackForPluginName( - const ConstString &name) { + ConstString name) { if (name) { std::lock_guard guard(GetEmulateInstructionMutex()); EmulateInstructionInstances &instances = GetEmulateInstructionInstances(); @@ -682,7 +682,7 @@ } 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 @@ OperatingSystemCreateInstance PluginManager::GetOperatingSystemCreateCallbackForPluginName( - const ConstString &name) { + ConstString name) { if (name) { std::lock_guard guard(GetOperatingSystemMutex()); OperatingSystemInstances &instances = GetOperatingSystemInstances(); @@ -763,7 +763,7 @@ 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 @@ } LanguageCreateInstance -PluginManager::GetLanguageCreateCallbackForPluginName(const ConstString &name) { +PluginManager::GetLanguageCreateCallbackForPluginName(ConstString name) { if (name) { std::lock_guard guard(GetLanguageMutex()); LanguageInstances &instances = GetLanguageInstances(); @@ -843,7 +843,7 @@ } 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 @@ LanguageRuntimeCreateInstance PluginManager::GetLanguageRuntimeCreateCallbackForPluginName( - const ConstString &name) { + ConstString name) { if (name) { std::lock_guard guard(GetLanguageRuntimeMutex()); LanguageRuntimeInstances &instances = GetLanguageRuntimeInstances(); @@ -934,7 +934,7 @@ } 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 @@ SystemRuntimeCreateInstance PluginManager::GetSystemRuntimeCreateCallbackForPluginName( - const ConstString &name) { + ConstString name) { if (name) { std::lock_guard guard(GetSystemRuntimeMutex()); SystemRuntimeInstances &instances = GetSystemRuntimeInstances(); @@ -1020,7 +1020,7 @@ } 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 @@ ObjectFileCreateInstance PluginManager::GetObjectFileCreateCallbackForPluginName( - const ConstString &name) { + ConstString name) { if (name) { std::lock_guard guard(GetObjectFileMutex()); ObjectFileInstances &instances = GetObjectFileInstances(); @@ -1103,7 +1103,7 @@ ObjectFileCreateMemoryInstance PluginManager::GetObjectFileCreateMemoryCallbackForPluginName( - const ConstString &name) { + ConstString name) { if (name) { std::lock_guard guard(GetObjectFileMutex()); ObjectFileInstances &instances = GetObjectFileInstances(); @@ -1159,7 +1159,7 @@ } 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 @@ ObjectContainerCreateInstance PluginManager::GetObjectContainerCreateCallbackForPluginName( - const ConstString &name) { + ConstString name) { if (name) { std::lock_guard guard(GetObjectContainerMutex()); ObjectContainerInstances &instances = GetObjectContainerInstances(); @@ -1254,7 +1254,7 @@ } 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 @@ } PlatformCreateInstance -PluginManager::GetPlatformCreateCallbackForPluginName(const ConstString &name) { +PluginManager::GetPlatformCreateCallbackForPluginName(ConstString name) { if (name) { std::lock_guard guard(GetPlatformInstancesMutex()); PlatformInstances &instances = GetPlatformInstances(); @@ -1373,7 +1373,7 @@ } 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 @@ } ProcessCreateInstance -PluginManager::GetProcessCreateCallbackForPluginName(const ConstString &name) { +PluginManager::GetProcessCreateCallbackForPluginName(ConstString name) { if (name) { std::lock_guard guard(GetProcessMutex()); ProcessInstances &instances = GetProcessInstances(); @@ -1472,7 +1472,7 @@ } 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 @@ } 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 @@ StructuredDataPluginCreateInstance PluginManager::GetStructuredDataPluginCreateCallbackForPluginName( - const ConstString &name) { + ConstString name) { if (name) { std::lock_guard guard(GetStructuredDataPluginMutex()); StructuredDataPluginInstances &instances = @@ -1671,7 +1671,7 @@ } 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 @@ SymbolFileCreateInstance PluginManager::GetSymbolFileCreateCallbackForPluginName( - const ConstString &name) { + ConstString name) { if (name) { std::lock_guard guard(GetSymbolFileMutex()); SymbolFileInstances &instances = GetSymbolFileInstances(); @@ -1751,7 +1751,7 @@ 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 @@ SymbolVendorCreateInstance PluginManager::GetSymbolVendorCreateCallbackForPluginName( - const ConstString &name) { + ConstString name) { if (name) { std::lock_guard guard(GetSymbolVendorMutex()); SymbolVendorInstances &instances = GetSymbolVendorInstances(); @@ -1832,7 +1832,7 @@ } 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 @@ UnwindAssemblyCreateInstance PluginManager::GetUnwindAssemblyCreateCallbackForPluginName( - const ConstString &name) { + ConstString name) { if (name) { std::lock_guard guard(GetUnwindAssemblyMutex()); UnwindAssemblyInstances &instances = GetUnwindAssemblyInstances(); @@ -1912,7 +1912,7 @@ } 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 @@ MemoryHistoryCreateInstance PluginManager::GetMemoryHistoryCreateCallbackForPluginName( - const ConstString &name) { + ConstString name) { if (name) { std::lock_guard guard(GetMemoryHistoryMutex()); MemoryHistoryInstances &instances = GetMemoryHistoryInstances(); @@ -1995,7 +1995,7 @@ } 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 @@ InstrumentationRuntimeCreateInstance PluginManager::GetInstrumentationRuntimeCreateCallbackForPluginName( - const ConstString &name) { + ConstString name) { if (name) { std::lock_guard guard( GetInstrumentationRuntimeMutex()); @@ -2093,7 +2093,7 @@ 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 @@ TypeSystemCreateInstance PluginManager::GetTypeSystemCreateCallbackForPluginName( - const ConstString &name) { + ConstString name) { if (name) { std::lock_guard guard(GetTypeSystemMutex()); TypeSystemInstances &instances = GetTypeSystemInstances(); @@ -2165,7 +2165,7 @@ TypeSystemEnumerateSupportedLanguages PluginManager::GetTypeSystemEnumerateSupportedLanguagesCallbackForPluginName( - const ConstString &name) { + ConstString name) { if (name) { std::lock_guard guard(GetTypeSystemMutex()); TypeSystemInstances &instances = GetTypeSystemInstances(); @@ -2203,7 +2203,7 @@ } 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::GetREPLCreateCallbackForPluginName(const ConstString &name) { +PluginManager::GetREPLCreateCallbackForPluginName(ConstString name) { if (name) { std::lock_guard guard(GetREPLMutex()); REPLInstances &instances = GetREPLInstances(); @@ -2270,7 +2270,7 @@ REPLEnumerateSupportedLanguages PluginManager::GetREPLSystemEnumerateSupportedLanguagesCallbackForPluginName( - const ConstString &name) { + ConstString name) { if (name) { std::lock_guard guard(GetREPLMutex()); REPLInstances &instances = GetREPLInstances(); @@ -2367,8 +2367,8 @@ // This will put a plugin's settings under e.g. // "plugin...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 @@ // ".plugin..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 @@ 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 @@ } 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 @@ } // 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ } 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, Index: lldb/trunk/source/Core/RichManglingContext.cpp =================================================================== --- lldb/trunk/source/Core/RichManglingContext.cpp +++ lldb/trunk/source/Core/RichManglingContext.cpp @@ -34,7 +34,7 @@ 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 @@ 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; Index: lldb/trunk/source/Core/Section.cpp =================================================================== --- lldb/trunk/source/Core/Section.cpp +++ lldb/trunk/source/Core/Section.cpp @@ -143,7 +143,7 @@ } 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 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::FindSectionByName(const ConstString §ion_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()) { Index: lldb/trunk/source/Core/UserSettingsController.cpp =================================================================== --- lldb/trunk/source/Core/UserSettingsController.cpp +++ lldb/trunk/source/Core/UserSettingsController.cpp @@ -94,7 +94,7 @@ 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); Index: lldb/trunk/source/Core/ValueObject.cpp =================================================================== --- lldb/trunk/source/Core/ValueObject.cpp +++ lldb/trunk/source/Core/ValueObject.cpp @@ -350,7 +350,7 @@ 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 @@ 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 @@ 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 @@ 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::const_iterator pos = m_synthetic_children.find(key); @@ -2740,7 +2740,7 @@ 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 @@ 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()); } Index: lldb/trunk/source/Core/ValueObjectCast.cpp =================================================================== --- lldb/trunk/source/Core/ValueObjectCast.cpp +++ lldb/trunk/source/Core/ValueObjectCast.cpp @@ -22,14 +22,14 @@ 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); Index: lldb/trunk/source/Core/ValueObjectChild.cpp =================================================================== --- lldb/trunk/source/Core/ValueObjectChild.cpp +++ lldb/trunk/source/Core/ValueObjectChild.cpp @@ -28,7 +28,7 @@ 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) Index: lldb/trunk/source/Core/ValueObjectConstResult.cpp =================================================================== --- lldb/trunk/source/Core/ValueObjectConstResult.cpp +++ lldb/trunk/source/Core/ValueObjectConstResult.cpp @@ -49,7 +49,7 @@ 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 @@ 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 @@ 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, 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 @@ 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 @@ 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, 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; Index: lldb/trunk/source/Core/ValueObjectConstResultCast.cpp =================================================================== --- lldb/trunk/source/Core/ValueObjectConstResultCast.cpp +++ lldb/trunk/source/Core/ValueObjectConstResultCast.cpp @@ -21,7 +21,7 @@ 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; Index: lldb/trunk/source/Core/ValueObjectConstResultChild.cpp =================================================================== --- lldb/trunk/source/Core/ValueObjectConstResultChild.cpp +++ lldb/trunk/source/Core/ValueObjectConstResultChild.cpp @@ -23,7 +23,7 @@ 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) Index: lldb/trunk/source/Core/ValueObjectRegister.cpp =================================================================== --- lldb/trunk/source/Core/ValueObjectRegister.cpp +++ lldb/trunk/source/Core/ValueObjectRegister.cpp @@ -186,7 +186,7 @@ } 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 @@ } 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()); Index: lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp =================================================================== --- lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp +++ lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp @@ -36,7 +36,7 @@ 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::GetChildMemberWithName(const ConstString &name, +ValueObjectSynthetic::GetChildMemberWithName(ConstString name, bool can_create) { UpdateValueIfNeeded(); @@ -295,7 +295,7 @@ 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; Index: lldb/trunk/source/DataFormatters/DataVisualization.cpp =================================================================== --- lldb/trunk/source/DataFormatters/DataVisualization.cpp +++ lldb/trunk/source/DataFormatters/DataVisualization.cpp @@ -96,7 +96,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ } 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); } Index: lldb/trunk/source/DataFormatters/FormatCache.cpp =================================================================== --- lldb/trunk/source/DataFormatters/FormatCache.cpp +++ lldb/trunk/source/DataFormatters/FormatCache.cpp @@ -109,7 +109,7 @@ { } -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 @@ return m_map[type]; } -bool FormatCache::GetFormat(const ConstString &type, +bool FormatCache::GetFormat(ConstString type, lldb::TypeFormatImplSP &format_sp) { std::lock_guard guard(m_mutex); auto entry = GetEntry(type); @@ -135,7 +135,7 @@ return false; } -bool FormatCache::GetSummary(const ConstString &type, +bool FormatCache::GetSummary(ConstString type, lldb::TypeSummaryImplSP &summary_sp) { std::lock_guard guard(m_mutex); auto entry = GetEntry(type); @@ -153,7 +153,7 @@ return false; } -bool FormatCache::GetSynthetic(const ConstString &type, +bool FormatCache::GetSynthetic(ConstString type, lldb::SyntheticChildrenSP &synthetic_sp) { std::lock_guard guard(m_mutex); auto entry = GetEntry(type); @@ -171,7 +171,7 @@ return false; } -bool FormatCache::GetValidator(const ConstString &type, +bool FormatCache::GetValidator(ConstString type, lldb::TypeValidatorImplSP &validator_sp) { std::lock_guard guard(m_mutex); auto entry = GetEntry(type); @@ -189,25 +189,25 @@ return false; } -void FormatCache::SetFormat(const ConstString &type, +void FormatCache::SetFormat(ConstString type, lldb::TypeFormatImplSP &format_sp) { std::lock_guard 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 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 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 guard(m_mutex); GetEntry(type).SetValidator(validator_sp); Index: lldb/trunk/source/DataFormatters/FormatManager.cpp =================================================================== --- lldb/trunk/source/DataFormatters/FormatManager.cpp +++ lldb/trunk/source/DataFormatters/FormatManager.cpp @@ -431,7 +431,7 @@ } 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 @@ return true; } -ConstString FormatManager::GetValidTypeName(const ConstString &type) { +ConstString FormatManager::GetValidTypeName(ConstString type) { return ::GetValidTypeName_Impl(type); } Index: lldb/trunk/source/DataFormatters/TypeSynthetic.cpp =================================================================== --- lldb/trunk/source/DataFormatters/TypeSynthetic.cpp +++ lldb/trunk/source/DataFormatters/TypeSynthetic.cpp @@ -51,7 +51,7 @@ } 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 @@ } 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, Index: lldb/trunk/source/DataFormatters/VectorType.cpp =================================================================== --- lldb/trunk/source/DataFormatters/VectorType.cpp +++ lldb/trunk/source/DataFormatters/VectorType.cpp @@ -233,7 +233,7 @@ 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()) Index: lldb/trunk/source/Expression/ExpressionVariable.cpp =================================================================== --- lldb/trunk/source/Expression/ExpressionVariable.cpp +++ lldb/trunk/source/Expression/ExpressionVariable.cpp @@ -30,7 +30,7 @@ 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()) Index: lldb/trunk/source/Expression/IRExecutionUnit.cpp =================================================================== --- lldb/trunk/source/Expression/IRExecutionUnit.cpp +++ lldb/trunk/source/Expression/IRExecutionUnit.cpp @@ -212,7 +212,7 @@ } } -void IRExecutionUnit::ReportSymbolLookupError(const ConstString &name) { +void IRExecutionUnit::ReportSymbolLookupError(ConstString name) { m_failed_lookups.push_back(name); } @@ -406,7 +406,7 @@ 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 @@ } 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 @@ void IRExecutionUnit::CollectCandidateCNames( std::vector &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 @@ std::vector &CPP_specs, const std::vector &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 @@ // 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::FindSymbol(const lldb_private::ConstString &name) { +IRExecutionUnit::FindSymbol(lldb_private::ConstString name) { std::vector candidate_C_names; std::vector candidate_CPlusPlus_names; Index: lldb/trunk/source/Host/common/FileSystem.cpp =================================================================== --- lldb/trunk/source/Host/common/FileSystem.cpp +++ lldb/trunk/source/Host/common/FileSystem.cpp @@ -305,12 +305,12 @@ 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; Index: lldb/trunk/source/Interpreter/OptionValueDictionary.cpp =================================================================== --- lldb/trunk/source/Interpreter/OptionValueDictionary.cpp +++ lldb/trunk/source/Interpreter/OptionValueDictionary.cpp @@ -276,7 +276,7 @@ } 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 @@ 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 @@ 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); Index: lldb/trunk/source/Interpreter/OptionValueProperties.cpp =================================================================== --- lldb/trunk/source/Interpreter/OptionValueProperties.cpp +++ lldb/trunk/source/Interpreter/OptionValueProperties.cpp @@ -20,7 +20,7 @@ using namespace lldb; using namespace lldb_private; -OptionValueProperties::OptionValueProperties(const ConstString &name) +OptionValueProperties::OptionValueProperties(ConstString name) : OptionValue(), m_name(name), m_properties(), m_name_to_index() {} OptionValueProperties::OptionValueProperties( @@ -66,8 +66,8 @@ property->SetValueChangedCallback(callback, baton); } -void OptionValueProperties::AppendProperty(const ConstString &name, - const ConstString &desc, +void OptionValueProperties::AppendProperty(ConstString name, + ConstString desc, bool is_global, const OptionValueSP &value_sp) { Property property(name, desc, is_global, value_sp); @@ -98,7 +98,7 @@ // lldb::OptionValueSP OptionValueProperties::GetValueForKey(const ExecutionContext *exe_ctx, - const ConstString &key, + ConstString key, bool will_modify) const { lldb::OptionValueSP value_sp; size_t idx = m_name_to_index.Find(key, SIZE_MAX); @@ -219,14 +219,14 @@ } uint32_t -OptionValueProperties::GetPropertyIndex(const ConstString &name) const { +OptionValueProperties::GetPropertyIndex(ConstString name) const { return m_name_to_index.Find(name, SIZE_MAX); } const Property * OptionValueProperties::GetProperty(const ExecutionContext *exe_ctx, bool will_modify, - const ConstString &name) const { + ConstString name) const { return GetPropertyAtIndex( exe_ctx, will_modify, m_name_to_index.Find(name, SIZE_MAX)); @@ -667,7 +667,7 @@ lldb::OptionValuePropertiesSP OptionValueProperties::GetSubProperty(const ExecutionContext *exe_ctx, - const ConstString &name) { + ConstString name) { lldb::OptionValueSP option_value_sp(GetValueForKey(exe_ctx, name, false)); if (option_value_sp) { OptionValueProperties *ov_properties = option_value_sp->GetAsProperties(); Index: lldb/trunk/source/Interpreter/Property.cpp =================================================================== --- lldb/trunk/source/Interpreter/Property.cpp +++ lldb/trunk/source/Interpreter/Property.cpp @@ -218,7 +218,7 @@ } } -Property::Property(const ConstString &name, const ConstString &desc, +Property::Property(ConstString name, ConstString desc, bool is_global, const lldb::OptionValueSP &value_sp) : m_name(name), m_description(desc), m_value_sp(value_sp), m_is_global(is_global) {} Index: lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp =================================================================== --- lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp +++ lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp @@ -59,7 +59,7 @@ for (size_t i = 0; i < symtab->GetNumSymbols(); i++) { const Symbol *sym = symtab->SymbolAtIndex(i); assert(sym != nullptr); - const ConstString &symName = sym->GetName(); + ConstString symName = sym->GetName(); if (ConstString::Compare(findName, symName) == 0) { Address addr = sym->GetAddress(); Index: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.h =================================================================== --- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.h +++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.h @@ -157,7 +157,7 @@ header.cputype, header.cpusubtype); } - const Segment *FindSegment(const lldb_private::ConstString &name) const; + const Segment *FindSegment(lldb_private::ConstString name) const; void PutToLog(lldb_private::Log *log) const; Index: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp =================================================================== --- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp +++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp @@ -728,7 +728,7 @@ } const DynamicLoaderDarwin::Segment * -DynamicLoaderDarwin::ImageInfo::FindSegment(const ConstString &name) const { +DynamicLoaderDarwin::ImageInfo::FindSegment(ConstString name) const { const size_t num_segments = segments.size(); for (size_t i = 0; i < num_segments; ++i) { if (segments[i].name == name) @@ -814,7 +814,7 @@ std::vector
addresses; if (current_symbol->IsTrampoline()) { - const ConstString &trampoline_name = current_symbol->GetMangled().GetName( + ConstString trampoline_name = current_symbol->GetMangled().GetName( current_symbol->GetLanguage(), Mangled::ePreferMangled); if (trampoline_name) { @@ -955,7 +955,7 @@ size_t DynamicLoaderDarwin::FindEquivalentSymbols( lldb_private::Symbol *original_symbol, lldb_private::ModuleList &images, lldb_private::SymbolContextList &equivalent_symbols) { - const ConstString &trampoline_name = original_symbol->GetMangled().GetName( + ConstString trampoline_name = original_symbol->GetMangled().GetName( original_symbol->GetLanguage(), Mangled::ePreferMangled); if (!trampoline_name) return 0; Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.h =================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.h +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.h @@ -198,7 +198,7 @@ /// one. //------------------------------------------------------------------ void CompleteNamespaceMap( - ClangASTImporter::NamespaceMapSP &namespace_map, const ConstString &name, + ClangASTImporter::NamespaceMapSP &namespace_map, ConstString name, ClangASTImporter::NamespaceMapSP &parent_map) const override; // Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp =================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp @@ -1836,7 +1836,7 @@ } void ClangASTSource::CompleteNamespaceMap( - ClangASTImporter::NamespaceMapSP &namespace_map, const ConstString &name, + ClangASTImporter::NamespaceMapSP &namespace_map, ConstString name, ClangASTImporter::NamespaceMapSP &parent_map) const { static unsigned int invocation_id = 0; unsigned int current_id = invocation_id++; Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h =================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h @@ -138,7 +138,7 @@ /// True on success; false otherwise. //------------------------------------------------------------------ bool AddPersistentVariable(const clang::NamedDecl *decl, - const ConstString &name, TypeFromParser type, + ConstString name, TypeFromParser type, bool is_result, bool is_lvalue); //------------------------------------------------------------------ @@ -163,7 +163,7 @@ /// @return /// True on success; false otherwise. //------------------------------------------------------------------ - bool AddValueToStruct(const clang::NamedDecl *decl, const ConstString &name, + bool AddValueToStruct(const clang::NamedDecl *decl, ConstString name, llvm::Value *value, size_t size, lldb::offset_t alignment); @@ -268,11 +268,11 @@ /// Valid load address for the symbol //------------------------------------------------------------------ lldb::addr_t GetSymbolAddress(Target &target, Process *process, - const ConstString &name, + ConstString name, lldb::SymbolType symbol_type, Module *module = NULL); - lldb::addr_t GetSymbolAddress(const ConstString &name, + lldb::addr_t GetSymbolAddress(ConstString name, lldb::SymbolType symbol_type); //------------------------------------------------------------------ @@ -467,7 +467,7 @@ /// The LLDB Variable found, or NULL if none was found. //------------------------------------------------------------------ lldb::VariableSP FindGlobalVariable(Target &target, lldb::ModuleSP &module, - const ConstString &name, + ConstString name, CompilerDeclContext *namespace_decl, TypeFromUser *type = NULL); Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp =================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp @@ -309,7 +309,7 @@ } bool ClangExpressionDeclMap::AddPersistentVariable(const NamedDecl *decl, - const ConstString &name, + ConstString name, TypeFromParser parser_type, bool is_result, bool is_lvalue) { @@ -424,7 +424,7 @@ } bool ClangExpressionDeclMap::AddValueToStruct(const NamedDecl *decl, - const ConstString &name, + ConstString name, llvm::Value *value, size_t size, lldb::offset_t alignment) { assert(m_struct_vars.get()); @@ -604,7 +604,7 @@ addr_t ClangExpressionDeclMap::GetSymbolAddress(Target &target, Process *process, - const ConstString &name, + ConstString name, lldb::SymbolType symbol_type, lldb_private::Module *module) { SymbolContextList sc_list; @@ -702,7 +702,7 @@ return symbol_load_addr; } -addr_t ClangExpressionDeclMap::GetSymbolAddress(const ConstString &name, +addr_t ClangExpressionDeclMap::GetSymbolAddress(ConstString name, lldb::SymbolType symbol_type) { assert(m_parser_vars.get()); @@ -715,7 +715,7 @@ } lldb::VariableSP ClangExpressionDeclMap::FindGlobalVariable( - Target &target, ModuleSP &module, const ConstString &name, + Target &target, ModuleSP &module, ConstString name, CompilerDeclContext *namespace_decl, TypeFromUser *type) { VariableList vars; Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h =================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h @@ -62,12 +62,12 @@ lldb::ByteOrder byte_order, uint32_t addr_byte_size); ClangExpressionVariable(ExecutionContextScope *exe_scope, Value &value, - const ConstString &name, uint16_t flags = EVNone); + ConstString name, uint16_t flags = EVNone); ClangExpressionVariable(const lldb::ValueObjectSP &valobj_sp); ClangExpressionVariable(ExecutionContextScope *exe_scope, - const ConstString &name, + ConstString name, const TypeFromUser &user_type, lldb::ByteOrder byte_order, uint32_t addr_byte_size); Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp =================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp @@ -31,7 +31,7 @@ } ClangExpressionVariable::ClangExpressionVariable( - ExecutionContextScope *exe_scope, Value &value, const ConstString &name, + ExecutionContextScope *exe_scope, Value &value, ConstString name, uint16_t flags) : ExpressionVariable(LLVMCastKind::eKindClang), m_parser_vars(), m_jit_vars() { @@ -48,7 +48,7 @@ } ClangExpressionVariable::ClangExpressionVariable( - ExecutionContextScope *exe_scope, const ConstString &name, + ExecutionContextScope *exe_scope, ConstString name, const TypeFromUser &user_type, lldb::ByteOrder byte_order, uint32_t addr_byte_size) : ExpressionVariable(LLVMCastKind::eKindClang), m_parser_vars(), Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp =================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp @@ -78,7 +78,7 @@ bool AddModulesForCompileUnit(CompileUnit &cu, ModuleVector &exported_modules, Stream &error_stream) override; - uint32_t FindDecls(const ConstString &name, bool append, uint32_t max_matches, + uint32_t FindDecls(ConstString name, bool append, uint32_t max_matches, std::vector &decls) override; void ForEachMacro(const ModuleVector &modules, @@ -340,7 +340,7 @@ // ClangImporter::lookupValue uint32_t -ClangModulesDeclVendorImpl::FindDecls(const ConstString &name, bool append, +ClangModulesDeclVendorImpl::FindDecls(ConstString name, bool append, uint32_t max_matches, std::vector &decls) { if (!m_enabled) { Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h =================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h @@ -44,7 +44,7 @@ CreatePersistentVariable(const lldb::ValueObjectSP &valobj_sp) override; lldb::ExpressionVariableSP CreatePersistentVariable( - ExecutionContextScope *exe_scope, const ConstString &name, + ExecutionContextScope *exe_scope, ConstString name, const CompilerType &compiler_type, lldb::ByteOrder byte_order, uint32_t addr_byte_size) override; @@ -54,9 +54,9 @@ return "$"; } - void RegisterPersistentDecl(const ConstString &name, clang::NamedDecl *decl); + void RegisterPersistentDecl(ConstString name, clang::NamedDecl *decl); - clang::NamedDecl *GetPersistentDecl(const ConstString &name); + clang::NamedDecl *GetPersistentDecl(ConstString name); void AddHandLoadedClangModule(ClangModulesDeclVendor::ModuleID module) { m_hand_loaded_clang_modules.push_back(module); Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp =================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp @@ -31,7 +31,7 @@ } ExpressionVariableSP ClangPersistentVariables::CreatePersistentVariable( - ExecutionContextScope *exe_scope, const ConstString &name, + ExecutionContextScope *exe_scope, ConstString name, const CompilerType &compiler_type, lldb::ByteOrder byte_order, uint32_t addr_byte_size) { return AddNewlyConstructedVariable(new ClangExpressionVariable( @@ -52,7 +52,7 @@ m_next_persistent_variable_id--; } -void ClangPersistentVariables::RegisterPersistentDecl(const ConstString &name, +void ClangPersistentVariables::RegisterPersistentDecl(ConstString name, clang::NamedDecl *decl) { m_persistent_decls.insert( std::pair(name.GetCString(), decl)); @@ -67,7 +67,7 @@ } clang::NamedDecl * -ClangPersistentVariables::GetPersistentDecl(const ConstString &name) { +ClangPersistentVariables::GetPersistentDecl(ConstString name) { PersistentDeclMap::const_iterator i = m_persistent_decls.find(name.GetCString()); Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.h =================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.h +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.h @@ -239,7 +239,7 @@ /// The Clang type of the result variable. //------------------------------------------------------------------ void MaybeSetConstantResult(llvm::Constant *initializer, - const lldb_private::ConstString &name, + lldb_private::ConstString name, lldb_private::TypeFromParser type); //------------------------------------------------------------------ Index: lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.h =================================================================== --- lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.h +++ lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.h @@ -54,7 +54,7 @@ private: lldb::addr_t GetSymbolAddress(lldb_private::ModuleList &module_list, - const lldb_private::ConstString &name, + lldb_private::ConstString name, lldb::SymbolType symbol_type) const; void SetJITBreakpoint(lldb_private::ModuleList &module_list); Index: lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp =================================================================== --- lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp +++ lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp @@ -459,7 +459,7 @@ } addr_t JITLoaderGDB::GetSymbolAddress(ModuleList &module_list, - const ConstString &name, + ConstString name, SymbolType symbol_type) const { SymbolContextList target_symbols; Target &target = m_process->GetTarget(); Index: lldb/trunk/source/Plugins/Language/CPlusPlus/BlockPointer.cpp =================================================================== --- lldb/trunk/source/Plugins/Language/CPlusPlus/BlockPointer.cpp +++ lldb/trunk/source/Plugins/Language/CPlusPlus/BlockPointer.cpp @@ -149,7 +149,7 @@ // maybe return false if the block pointer is, say, null bool MightHaveChildren() override { return true; } - size_t GetIndexOfChildWithName(const ConstString &name) override { + size_t GetIndexOfChildWithName(ConstString name) override { if (!m_block_struct_type.IsValid()) return UINT32_MAX; Index: lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h =================================================================== --- lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h +++ lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h @@ -31,7 +31,7 @@ : m_full(), m_basename(), m_context(), m_arguments(), m_qualifiers(), m_parsed(false), m_parse_error(false) {} - MethodName(const ConstString &s) + MethodName(ConstString s) : m_full(s), m_basename(), m_context(), m_arguments(), m_qualifiers(), m_parsed(false), m_parse_error(false) {} @@ -45,7 +45,7 @@ return (bool)m_full; } - const ConstString &GetFullName() const { return m_full; } + ConstString GetFullName() const { return m_full; } std::string GetScopeQualifiedName(); Index: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxx.h =================================================================== --- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxx.h +++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxx.h @@ -66,7 +66,7 @@ bool MightHaveChildren() override; - size_t GetIndexOfChildWithName(const ConstString &name) override; + size_t GetIndexOfChildWithName(ConstString name) override; ~LibCxxMapIteratorSyntheticFrontEnd() override; @@ -95,7 +95,7 @@ bool MightHaveChildren() override; - size_t GetIndexOfChildWithName(const ConstString &name) override; + size_t GetIndexOfChildWithName(ConstString name) override; ~LibcxxSharedPtrSyntheticFrontEnd() override; Index: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxx.cpp =================================================================== --- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxx.cpp +++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxx.cpp @@ -299,7 +299,7 @@ } size_t lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd:: - GetIndexOfChildWithName(const ConstString &name) { + GetIndexOfChildWithName(ConstString name) { if (name == ConstString("first")) return 0; if (name == ConstString("second")) @@ -429,7 +429,7 @@ } size_t lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEnd:: - GetIndexOfChildWithName(const ConstString &name) { + GetIndexOfChildWithName(ConstString name) { if (name == ConstString("__ptr_")) return 0; if (name == ConstString("count")) Index: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxAtomic.cpp =================================================================== --- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxAtomic.cpp +++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxAtomic.cpp @@ -99,7 +99,7 @@ bool MightHaveChildren() override; - size_t GetIndexOfChildWithName(const ConstString &name) override; + size_t GetIndexOfChildWithName(ConstString name) override; lldb::ValueObjectSP GetSyntheticValue() override; @@ -138,7 +138,7 @@ } size_t lldb_private::formatters::LibcxxStdAtomicSyntheticFrontEnd:: - GetIndexOfChildWithName(const ConstString &name) { + GetIndexOfChildWithName(ConstString name) { return m_real_child ? m_real_child->GetIndexOfChildWithName(name) : UINT32_MAX; } Index: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxBitset.cpp =================================================================== --- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxBitset.cpp +++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxBitset.cpp @@ -20,7 +20,7 @@ public: BitsetFrontEnd(ValueObject &valobj); - size_t GetIndexOfChildWithName(const ConstString &name) override { + size_t GetIndexOfChildWithName(ConstString name) override { return formatters::ExtractIndexFromString(name.GetCString()); } Index: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp =================================================================== --- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp +++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp @@ -33,7 +33,7 @@ bool MightHaveChildren() override; - size_t GetIndexOfChildWithName(const ConstString &name) override; + size_t GetIndexOfChildWithName(ConstString name) override; private: ValueObject *m_start; @@ -108,7 +108,7 @@ } size_t lldb_private::formatters::LibcxxInitializerListSyntheticFrontEnd:: - GetIndexOfChildWithName(const ConstString &name) { + GetIndexOfChildWithName(ConstString name) { if (!m_start) return UINT32_MAX; return ExtractIndexFromString(name.GetCString()); Index: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxList.cpp =================================================================== --- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxList.cpp +++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxList.cpp @@ -111,7 +111,7 @@ class AbstractListFrontEnd : public SyntheticChildrenFrontEnd { public: - size_t GetIndexOfChildWithName(const ConstString &name) override { + size_t GetIndexOfChildWithName(ConstString name) override { return ExtractIndexFromString(name.GetCString()); } bool MightHaveChildren() override { return true; } Index: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp =================================================================== --- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp +++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp @@ -184,7 +184,7 @@ bool MightHaveChildren() override; - size_t GetIndexOfChildWithName(const ConstString &name) override; + size_t GetIndexOfChildWithName(ConstString name) override; private: bool GetDataType(); @@ -452,7 +452,7 @@ } size_t lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd:: - GetIndexOfChildWithName(const ConstString &name) { + GetIndexOfChildWithName(ConstString name) { return ExtractIndexFromString(name.GetCString()); } Index: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxOptional.cpp =================================================================== --- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxOptional.cpp +++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxOptional.cpp @@ -20,7 +20,7 @@ Update(); } - size_t GetIndexOfChildWithName(const ConstString &name) override { + size_t GetIndexOfChildWithName(ConstString name) override { return formatters::ExtractIndexFromString(name.GetCString()); } Index: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxQueue.cpp =================================================================== --- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxQueue.cpp +++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxQueue.cpp @@ -20,7 +20,7 @@ Update(); } - size_t GetIndexOfChildWithName(const ConstString &name) override { + size_t GetIndexOfChildWithName(ConstString name) override { return m_container_sp ? m_container_sp->GetIndexOfChildWithName(name) : UINT32_MAX; } Index: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxTuple.cpp =================================================================== --- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxTuple.cpp +++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxTuple.cpp @@ -20,7 +20,7 @@ Update(); } - size_t GetIndexOfChildWithName(const ConstString &name) override { + size_t GetIndexOfChildWithName(ConstString name) override { return formatters::ExtractIndexFromString(name.GetCString()); } Index: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp =================================================================== --- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp +++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp @@ -39,7 +39,7 @@ bool MightHaveChildren() override; - size_t GetIndexOfChildWithName(const ConstString &name) override; + size_t GetIndexOfChildWithName(ConstString name) override; private: CompilerType m_element_type; @@ -209,7 +209,7 @@ } size_t lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd:: - GetIndexOfChildWithName(const ConstString &name) { + GetIndexOfChildWithName(ConstString name) { return ExtractIndexFromString(name.GetCString()); } Index: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp =================================================================== --- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp +++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp @@ -173,7 +173,7 @@ Update(); } - size_t GetIndexOfChildWithName(const ConstString &name) override { + size_t GetIndexOfChildWithName(ConstString name) override { return formatters::ExtractIndexFromString(name.GetCString()); } Index: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp =================================================================== --- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp +++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp @@ -32,7 +32,7 @@ bool MightHaveChildren() override; - size_t GetIndexOfChildWithName(const ConstString &name) override; + size_t GetIndexOfChildWithName(ConstString name) override; private: ValueObject *m_start; @@ -53,7 +53,7 @@ bool MightHaveChildren() override { return true; } - size_t GetIndexOfChildWithName(const ConstString &name) override; + size_t GetIndexOfChildWithName(ConstString name) override; private: CompilerType m_bool_type; @@ -164,7 +164,7 @@ } size_t lldb_private::formatters::LibcxxStdVectorSyntheticFrontEnd:: - GetIndexOfChildWithName(const ConstString &name) { + GetIndexOfChildWithName(ConstString name) { if (!m_start || !m_finish) return UINT32_MAX; return ExtractIndexFromString(name.GetCString()); @@ -271,7 +271,7 @@ } size_t lldb_private::formatters::LibcxxVectorBoolSyntheticFrontEnd:: - GetIndexOfChildWithName(const ConstString &name) { + GetIndexOfChildWithName(ConstString name) { if (!m_count || !m_base_data_address) return UINT32_MAX; const char *item_name = name.GetCString(); Index: lldb/trunk/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp =================================================================== --- lldb/trunk/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp +++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp @@ -49,7 +49,7 @@ bool MightHaveChildren() override; - size_t GetIndexOfChildWithName(const ConstString &name) override; + size_t GetIndexOfChildWithName(ConstString name) override; private: ExecutionContextRef m_exe_ctx_ref; @@ -70,7 +70,7 @@ bool MightHaveChildren() override; - size_t GetIndexOfChildWithName(const ConstString &name) override; + size_t GetIndexOfChildWithName(ConstString name) override; }; } // end of anonymous namespace @@ -141,7 +141,7 @@ bool LibstdcppMapIteratorSyntheticFrontEnd::MightHaveChildren() { return true; } size_t LibstdcppMapIteratorSyntheticFrontEnd::GetIndexOfChildWithName( - const ConstString &name) { + ConstString name) { if (name == ConstString("first")) return 0; if (name == ConstString("second")) @@ -223,7 +223,7 @@ bool VectorIteratorSyntheticFrontEnd::MightHaveChildren() { return true; } size_t VectorIteratorSyntheticFrontEnd::GetIndexOfChildWithName( - const ConstString &name) { + ConstString name) { if (name == ConstString("item")) return 0; return UINT32_MAX; @@ -373,7 +373,7 @@ bool LibStdcppSharedPtrSyntheticFrontEnd::MightHaveChildren() { return true; } size_t LibStdcppSharedPtrSyntheticFrontEnd::GetIndexOfChildWithName( - const ConstString &name) { + ConstString name) { if (name == ConstString("_M_ptr")) return 0; return UINT32_MAX; Index: lldb/trunk/source/Plugins/Language/CPlusPlus/LibStdcppTuple.cpp =================================================================== --- lldb/trunk/source/Plugins/Language/CPlusPlus/LibStdcppTuple.cpp +++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibStdcppTuple.cpp @@ -34,7 +34,7 @@ bool MightHaveChildren() override; - size_t GetIndexOfChildWithName(const ConstString &name) override; + size_t GetIndexOfChildWithName(ConstString name) override; private: std::vector m_members; @@ -95,7 +95,7 @@ } size_t LibStdcppTupleSyntheticFrontEnd::GetIndexOfChildWithName( - const ConstString &name) { + ConstString name) { return ExtractIndexFromString(name.GetCString()); } Index: lldb/trunk/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp =================================================================== --- lldb/trunk/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp +++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp @@ -34,7 +34,7 @@ bool MightHaveChildren() override; - size_t GetIndexOfChildWithName(const ConstString &name) override; + size_t GetIndexOfChildWithName(ConstString name) override; bool GetSummary(Stream &stream, const TypeSummaryOptions &options); @@ -129,7 +129,7 @@ } size_t LibStdcppUniquePtrSyntheticFrontEnd::GetIndexOfChildWithName( - const ConstString &name) { + ConstString name) { if (name == ConstString("ptr") || name == ConstString("pointer")) return 0; if (name == ConstString("del") || name == ConstString("deleter")) Index: lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp =================================================================== --- lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp +++ lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp @@ -935,7 +935,7 @@ bool MightHaveChildren() override { return false; } - size_t GetIndexOfChildWithName(const ConstString &name) override { + size_t GetIndexOfChildWithName(ConstString name) override { return UINT32_MAX; } }; Index: lldb/trunk/source/Plugins/Language/ObjC/NSArray.cpp =================================================================== --- lldb/trunk/source/Plugins/Language/ObjC/NSArray.cpp +++ lldb/trunk/source/Plugins/Language/ObjC/NSArray.cpp @@ -57,7 +57,7 @@ bool MightHaveChildren() override; - size_t GetIndexOfChildWithName(const ConstString &name) override; + size_t GetIndexOfChildWithName(ConstString name) override; protected: virtual lldb::addr_t GetDataAddress() = 0; @@ -242,7 +242,7 @@ bool MightHaveChildren() override; - size_t GetIndexOfChildWithName(const ConstString &name) override; + size_t GetIndexOfChildWithName(ConstString name) override; private: ExecutionContextRef m_exe_ctx_ref; @@ -314,7 +314,7 @@ bool MightHaveChildren() override; - size_t GetIndexOfChildWithName(const ConstString &name) override; + size_t GetIndexOfChildWithName(ConstString name) override; }; class NSArray1SyntheticFrontEnd : public SyntheticChildrenFrontEnd { @@ -331,7 +331,7 @@ bool MightHaveChildren() override; - size_t GetIndexOfChildWithName(const ConstString &name) override; + size_t GetIndexOfChildWithName(ConstString name) override; }; } // namespace formatters } // namespace lldb_private @@ -544,7 +544,7 @@ size_t lldb_private::formatters::NSArrayMSyntheticFrontEndBase::GetIndexOfChildWithName( - const ConstString &name) { + ConstString name) { const char *item_name = name.GetCString(); uint32_t idx = ExtractIndexFromString(item_name); if (idx < UINT32_MAX && idx >= CalculateNumChildren()) @@ -633,7 +633,7 @@ template size_t lldb_private::formatters::GenericNSArrayISyntheticFrontEnd:: - GetIndexOfChildWithName(const ConstString &name) { + GetIndexOfChildWithName(ConstString name) { const char *item_name = name.GetCString(); uint32_t idx = ExtractIndexFromString(item_name); if (idx < UINT32_MAX && idx >= CalculateNumChildren()) @@ -723,7 +723,7 @@ size_t lldb_private::formatters::NSArray0SyntheticFrontEnd::GetIndexOfChildWithName( - const ConstString &name) { + ConstString name) { return UINT32_MAX; } @@ -752,7 +752,7 @@ size_t lldb_private::formatters::NSArray1SyntheticFrontEnd::GetIndexOfChildWithName( - const ConstString &name) { + ConstString name) { static const ConstString g_zero("[0]"); if (name == g_zero) Index: lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp =================================================================== --- lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp +++ lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp @@ -111,7 +111,7 @@ bool MightHaveChildren() override; - size_t GetIndexOfChildWithName(const ConstString &name) override; + size_t GetIndexOfChildWithName(ConstString name) override; private: struct DataDescriptor_32 { @@ -154,7 +154,7 @@ bool MightHaveChildren() override; - size_t GetIndexOfChildWithName(const ConstString &name) override; + size_t GetIndexOfChildWithName(ConstString name) override; private: ValueObjectSP m_pair; @@ -175,7 +175,7 @@ bool MightHaveChildren() override; - size_t GetIndexOfChildWithName(const ConstString &name) override; + size_t GetIndexOfChildWithName(ConstString name) override; private: struct DictionaryItemDescriptor { @@ -208,7 +208,7 @@ bool MightHaveChildren() override; - size_t GetIndexOfChildWithName(const ConstString &name) override; + size_t GetIndexOfChildWithName(ConstString name) override; private: struct DataDescriptor_32 { @@ -512,7 +512,7 @@ } size_t lldb_private::formatters::NSDictionaryISyntheticFrontEnd:: - GetIndexOfChildWithName(const ConstString &name) { + GetIndexOfChildWithName(ConstString name) { const char *item_name = name.GetCString(); uint32_t idx = ExtractIndexFromString(item_name); if (idx < UINT32_MAX && idx >= CalculateNumChildren()) @@ -648,7 +648,7 @@ : SyntheticChildrenFrontEnd(*valobj_sp.get()), m_pair(nullptr) {} size_t lldb_private::formatters::NSDictionary1SyntheticFrontEnd:: - GetIndexOfChildWithName(const ConstString &name) { + GetIndexOfChildWithName(ConstString name) { static const ConstString g_zero("[0]"); return name == g_zero ? 0 : UINT32_MAX; } @@ -736,7 +736,7 @@ template size_t -lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd:: GetIndexOfChildWithName(const ConstString &name) { +lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd:: GetIndexOfChildWithName(ConstString name) { const char *item_name = name.GetCString(); uint32_t idx = ExtractIndexFromString(item_name); if (idx < UINT32_MAX && idx >= CalculateNumChildren()) @@ -905,7 +905,7 @@ size_t lldb_private::formatters::Foundation1100:: - NSDictionaryMSyntheticFrontEnd::GetIndexOfChildWithName(const ConstString &name) { + NSDictionaryMSyntheticFrontEnd::GetIndexOfChildWithName(ConstString name) { const char *item_name = name.GetCString(); uint32_t idx = ExtractIndexFromString(item_name); if (idx < UINT32_MAX && idx >= CalculateNumChildren()) Index: lldb/trunk/source/Plugins/Language/ObjC/NSError.cpp =================================================================== --- lldb/trunk/source/Plugins/Language/ObjC/NSError.cpp +++ lldb/trunk/source/Plugins/Language/ObjC/NSError.cpp @@ -163,7 +163,7 @@ bool MightHaveChildren() override { return true; } - size_t GetIndexOfChildWithName(const ConstString &name) override { + size_t GetIndexOfChildWithName(ConstString name) override { static ConstString g___userInfo("_userInfo"); if (name == g___userInfo) return 0; Index: lldb/trunk/source/Plugins/Language/ObjC/NSException.cpp =================================================================== --- lldb/trunk/source/Plugins/Language/ObjC/NSException.cpp +++ lldb/trunk/source/Plugins/Language/ObjC/NSException.cpp @@ -149,7 +149,7 @@ bool MightHaveChildren() override { return true; } - size_t GetIndexOfChildWithName(const ConstString &name) override { + size_t GetIndexOfChildWithName(ConstString name) override { // NSException has 4 members: // NSString *name; // NSString *reason; Index: lldb/trunk/source/Plugins/Language/ObjC/NSIndexPath.cpp =================================================================== --- lldb/trunk/source/Plugins/Language/ObjC/NSIndexPath.cpp +++ lldb/trunk/source/Plugins/Language/ObjC/NSIndexPath.cpp @@ -127,7 +127,7 @@ bool MightHaveChildren() override { return m_impl.m_mode != Mode::Invalid; } - 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()) Index: lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp =================================================================== --- lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp +++ lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp @@ -54,7 +54,7 @@ bool MightHaveChildren() override; - size_t GetIndexOfChildWithName(const ConstString &name) override; + size_t GetIndexOfChildWithName(ConstString name) override; private: struct DataDescriptor_32 { @@ -95,7 +95,7 @@ bool MightHaveChildren() override; - size_t GetIndexOfChildWithName(const ConstString &name) override; + size_t GetIndexOfChildWithName(ConstString name) override; private: @@ -211,7 +211,7 @@ bool MightHaveChildren() override; - size_t GetIndexOfChildWithName(const ConstString &name) override; + size_t GetIndexOfChildWithName(ConstString name) override; }; } // namespace formatters } // namespace lldb_private @@ -374,7 +374,7 @@ size_t lldb_private::formatters::NSSetISyntheticFrontEnd::GetIndexOfChildWithName( - const ConstString &name) { + ConstString name) { const char *item_name = name.GetCString(); uint32_t idx = ExtractIndexFromString(item_name); if (idx < UINT32_MAX && idx >= CalculateNumChildren()) @@ -529,7 +529,7 @@ size_t lldb_private::formatters:: GenericNSSetMSyntheticFrontEnd::GetIndexOfChildWithName( - const ConstString &name) { + ConstString name) { const char *item_name = name.GetCString(); uint32_t idx = ExtractIndexFromString(item_name); if (idx < UINT32_MAX && idx >= CalculateNumChildren()) Index: lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.h =================================================================== --- lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.h +++ lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.h @@ -58,20 +58,20 @@ Type GetType() const { return m_type; } - const ConstString &GetFullName() const { return m_full; } + ConstString GetFullName() const { return m_full; } ConstString GetFullNameWithoutCategory(bool empty_if_no_category); bool SetName(const char *name, bool strict); bool SetName(llvm::StringRef name, bool strict); - const ConstString &GetClassName(); + ConstString GetClassName(); - const ConstString &GetClassNameWithCategory(); + ConstString GetClassNameWithCategory(); - const ConstString &GetCategory(); + ConstString GetCategory(); - const ConstString &GetSelector(); + ConstString GetSelector(); // Get all possible names for a method. Examples: // If name is "+[NSString(my_additions) myStringWithCString:]" Index: lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.cpp =================================================================== --- lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.cpp +++ lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.cpp @@ -119,7 +119,7 @@ return SetName(llvm::StringRef(name), strict); } -const ConstString &ObjCLanguage::MethodName::GetClassName() { +ConstString ObjCLanguage::MethodName::GetClassName() { if (!m_class) { if (IsValid(false)) { const char *full = m_full.GetCString(); @@ -145,7 +145,7 @@ return m_class; } -const ConstString &ObjCLanguage::MethodName::GetClassNameWithCategory() { +ConstString ObjCLanguage::MethodName::GetClassNameWithCategory() { if (!m_class_category) { if (IsValid(false)) { const char *full = m_full.GetCString(); @@ -168,7 +168,7 @@ return m_class_category; } -const ConstString &ObjCLanguage::MethodName::GetSelector() { +ConstString ObjCLanguage::MethodName::GetSelector() { if (!m_selector) { if (IsValid(false)) { const char *full = m_full.GetCString(); @@ -183,7 +183,7 @@ return m_selector; } -const ConstString &ObjCLanguage::MethodName::GetCategory() { +ConstString ObjCLanguage::MethodName::GetCategory() { if (!m_category_is_valid && !m_category) { if (IsValid(false)) { m_category_is_valid = true; @@ -232,7 +232,7 @@ StreamString strm; const bool is_class_method = m_type == eTypeClassMethod; const bool is_instance_method = m_type == eTypeInstanceMethod; - const ConstString &category = GetCategory(); + ConstString category = GetCategory(); if (is_class_method || is_instance_method) { names.push_back(m_full); if (category) { @@ -241,8 +241,8 @@ names.emplace_back(strm.GetString()); } } else { - const ConstString &class_name = GetClassName(); - const ConstString &selector = GetSelector(); + ConstString class_name = GetClassName(); + ConstString selector = GetSelector(); strm.Printf("+[%s %s]", class_name.GetCString(), selector.GetCString()); names.emplace_back(strm.GetString()); strm.Clear(); Index: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.h =================================================================== --- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.h +++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.h @@ -22,7 +22,7 @@ public: AppleObjCDeclVendor(ObjCLanguageRuntime &runtime); - uint32_t FindDecls(const ConstString &name, bool append, uint32_t max_matches, + uint32_t FindDecls(ConstString name, bool append, uint32_t max_matches, std::vector &decls) override; clang::ExternalASTMerger::ImporterSource GetImporterSource() override; Index: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp =================================================================== --- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp +++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp @@ -175,7 +175,7 @@ if (!descriptor) return NULL; - const ConstString &name(descriptor->GetClassName()); + ConstString name(descriptor->GetClassName()); clang::IdentifierInfo &identifier_info = ast_ctx->Idents.get(name.GetStringRef()); @@ -547,7 +547,7 @@ } uint32_t -AppleObjCDeclVendor::FindDecls(const ConstString &name, bool append, +AppleObjCDeclVendor::FindDecls(ConstString name, bool append, uint32_t max_matches, std::vector &decls) { static unsigned int invocation_id = 0; Index: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h =================================================================== --- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h +++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h @@ -79,7 +79,7 @@ DeclVendor *GetDeclVendor() override; - lldb::addr_t LookupRuntimeSymbol(const ConstString &name) override; + lldb::addr_t LookupRuntimeSymbol(ConstString name) override; EncodingToTypeSP GetEncodingToType() override; Index: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp =================================================================== --- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -1951,7 +1951,7 @@ return m_decl_vendor_up.get(); } -lldb::addr_t AppleObjCRuntimeV2::LookupRuntimeSymbol(const ConstString &name) { +lldb::addr_t AppleObjCRuntimeV2::LookupRuntimeSymbol(ConstString name) { lldb::addr_t ret = LLDB_INVALID_ADDRESS; const char *name_cstr = name.AsCString(); Index: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h =================================================================== --- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h +++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h @@ -245,7 +245,7 @@ class RSScriptGroupBreakpointResolver : public BreakpointResolver { public: - RSScriptGroupBreakpointResolver(Breakpoint *bp, const ConstString &name, + RSScriptGroupBreakpointResolver(Breakpoint *bp, ConstString name, const RSScriptGroupList &groups, bool stop_on_all) : BreakpointResolver(bp, BreakpointResolver::NameResolver), @@ -275,7 +275,7 @@ protected: const RSScriptGroupDescriptorSP - FindScriptGroup(const ConstString &name) const { + FindScriptGroup(ConstString name) const { for (auto sg : m_script_groups) { if (ConstString::Compare(sg->m_name, name) == 0) return sg; @@ -365,7 +365,7 @@ int kernel_types = ~(0)); bool PlaceBreakpointOnScriptGroup(lldb::TargetSP target, Stream &strm, - const ConstString &name, bool stop_on_all); + ConstString name, bool stop_on_all); void SetBreakAllKernels(bool do_break, lldb::TargetSP target); @@ -387,7 +387,7 @@ return m_scriptGroups; }; - bool IsKnownKernel(const ConstString &name) { + bool IsKnownKernel(ConstString name) { for (const auto &module : m_rsmodules) for (const auto &kernel : module->m_kernels) if (kernel.m_name == name) @@ -428,12 +428,12 @@ bool EvalRSExpression(const char *expression, StackFrame *frame_ptr, uint64_t *result); - lldb::BreakpointSP CreateScriptGroupBreakpoint(const ConstString &name, + lldb::BreakpointSP CreateScriptGroupBreakpoint(ConstString name, bool multi); - lldb::BreakpointSP CreateKernelBreakpoint(const ConstString &name); + lldb::BreakpointSP CreateKernelBreakpoint(ConstString name); - lldb::BreakpointSP CreateReductionBreakpoint(const ConstString &name, + lldb::BreakpointSP CreateReductionBreakpoint(ConstString name, int kernel_types); void BreakOnModuleKernels( Index: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp =================================================================== --- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp +++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp @@ -592,7 +592,7 @@ array_size; // Number of items in array, only needed for structs ConstString type_name; // Name of type, only needed for structs - static const ConstString & + static ConstString GetFallbackStructName(); // Print this as the type name of a struct Element // If we can't resolve the actual struct name @@ -692,7 +692,7 @@ } }; -const ConstString &RenderScriptRuntime::Element::GetFallbackStructName() { +ConstString RenderScriptRuntime::Element::GetFallbackStructName() { static const ConstString FallbackStructName("struct"); return FallbackStructName; } @@ -2363,7 +2363,7 @@ size_diff); for (uint32_t i = 0; i < size_diff; ++i) { - const ConstString &name = elem.children[num_children + i].type_name; + ConstString name = elem.children[num_children + i].type_name; if (strcmp(name.AsCString(), "#rs_padding") < 0) found = false; } @@ -3594,7 +3594,7 @@ // Given the name of a kernel this function creates a breakpoint using our own // breakpoint resolver, and returns the Breakpoint shared pointer. BreakpointSP -RenderScriptRuntime::CreateKernelBreakpoint(const ConstString &name) { +RenderScriptRuntime::CreateKernelBreakpoint(ConstString name) { Log *log( GetLogIfAnyCategoriesSet(LIBLLDB_LOG_LANGUAGE | LIBLLDB_LOG_BREAKPOINTS)); @@ -3622,7 +3622,7 @@ } BreakpointSP -RenderScriptRuntime::CreateReductionBreakpoint(const ConstString &name, +RenderScriptRuntime::CreateReductionBreakpoint(ConstString name, int kernel_types) { Log *log( GetLogIfAnyCategoriesSet(LIBLLDB_LOG_LANGUAGE | LIBLLDB_LOG_BREAKPOINTS)); @@ -3863,7 +3863,7 @@ } BreakpointSP -RenderScriptRuntime::CreateScriptGroupBreakpoint(const ConstString &name, +RenderScriptRuntime::CreateScriptGroupBreakpoint(ConstString name, bool stop_on_all) { Log *log( GetLogIfAnyCategoriesSet(LIBLLDB_LOG_LANGUAGE | LIBLLDB_LOG_BREAKPOINTS)); @@ -3893,7 +3893,7 @@ bool RenderScriptRuntime::PlaceBreakpointOnScriptGroup(TargetSP target, Stream &strm, - const ConstString &name, + ConstString name, bool multi) { InitSearchFilter(target); BreakpointSP bp = CreateScriptGroupBreakpoint(name, multi); Index: lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h =================================================================== --- lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h +++ lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h @@ -136,7 +136,7 @@ size_t ParseObjects(); - Object *FindObject(const lldb_private::ConstString &object_name, + Object *FindObject(lldb_private::ConstString object_name, const llvm::sys::TimePoint<> &object_mod_time); lldb::offset_t GetFileOffset() const { return m_file_offset; } Index: lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp =================================================================== --- lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp +++ lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp @@ -169,7 +169,7 @@ ObjectContainerBSDArchive::Object * ObjectContainerBSDArchive::Archive::FindObject( - const ConstString &object_name, + ConstString object_name, const llvm::sys::TimePoint<> &object_mod_time) { const ObjectNameToIndexMap::Entry *match = m_object_name_to_index_map.FindFirstValueForName(object_name); Index: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp =================================================================== --- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -2176,7 +2176,7 @@ if (symbol_type == eSymbolTypeInvalid && symbol.getType() != STT_SECTION) { if (symbol_section_sp) { - const ConstString §_name = symbol_section_sp->GetName(); + ConstString sect_name = symbol_section_sp->GetName(); if (sect_name == text_section_name || sect_name == init_section_name || sect_name == fini_section_name || sect_name == ctors_section_name || sect_name == dtors_section_name) { @@ -2320,7 +2320,7 @@ if (symbol_section_sp && module_section_list && module_section_list != section_list) { - const ConstString §_name = symbol_section_sp->GetName(); + ConstString sect_name = symbol_section_sp->GetName(); auto section_it = section_name_to_section.find(sect_name.GetCString()); if (section_it == section_name_to_section.end()) section_it = Index: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h =================================================================== --- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h +++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h @@ -193,14 +193,14 @@ bool SectionIsLoadable(const lldb_private::Section *section); llvm::MachO::mach_header m_header; - static const lldb_private::ConstString &GetSegmentNameTEXT(); - static const lldb_private::ConstString &GetSegmentNameDATA(); - static const lldb_private::ConstString &GetSegmentNameDATA_DIRTY(); - static const lldb_private::ConstString &GetSegmentNameDATA_CONST(); - static const lldb_private::ConstString &GetSegmentNameOBJC(); - static const lldb_private::ConstString &GetSegmentNameLINKEDIT(); - static const lldb_private::ConstString &GetSegmentNameDWARF(); - static const lldb_private::ConstString &GetSectionNameEHFrame(); + static lldb_private::ConstString GetSegmentNameTEXT(); + static lldb_private::ConstString GetSegmentNameDATA(); + static lldb_private::ConstString GetSegmentNameDATA_DIRTY(); + static lldb_private::ConstString GetSegmentNameDATA_CONST(); + static lldb_private::ConstString GetSegmentNameOBJC(); + static lldb_private::ConstString GetSegmentNameLINKEDIT(); + static lldb_private::ConstString GetSegmentNameDWARF(); + static lldb_private::ConstString GetSectionNameEHFrame(); llvm::MachO::dysymtab_command m_dysymtab; std::vector m_mach_segments; Index: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp =================================================================== --- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -927,42 +927,42 @@ return specs.GetSize() - initial_count; } -const ConstString &ObjectFileMachO::GetSegmentNameTEXT() { +ConstString ObjectFileMachO::GetSegmentNameTEXT() { static ConstString g_segment_name_TEXT("__TEXT"); return g_segment_name_TEXT; } -const ConstString &ObjectFileMachO::GetSegmentNameDATA() { +ConstString ObjectFileMachO::GetSegmentNameDATA() { static ConstString g_segment_name_DATA("__DATA"); return g_segment_name_DATA; } -const ConstString &ObjectFileMachO::GetSegmentNameDATA_DIRTY() { +ConstString ObjectFileMachO::GetSegmentNameDATA_DIRTY() { static ConstString g_segment_name("__DATA_DIRTY"); return g_segment_name; } -const ConstString &ObjectFileMachO::GetSegmentNameDATA_CONST() { +ConstString ObjectFileMachO::GetSegmentNameDATA_CONST() { static ConstString g_segment_name("__DATA_CONST"); return g_segment_name; } -const ConstString &ObjectFileMachO::GetSegmentNameOBJC() { +ConstString ObjectFileMachO::GetSegmentNameOBJC() { static ConstString g_segment_name_OBJC("__OBJC"); return g_segment_name_OBJC; } -const ConstString &ObjectFileMachO::GetSegmentNameLINKEDIT() { +ConstString ObjectFileMachO::GetSegmentNameLINKEDIT() { static ConstString g_section_name_LINKEDIT("__LINKEDIT"); return g_section_name_LINKEDIT; } -const ConstString &ObjectFileMachO::GetSegmentNameDWARF() { +ConstString ObjectFileMachO::GetSegmentNameDWARF() { static ConstString g_section_name("__DWARF"); return g_section_name; } -const ConstString &ObjectFileMachO::GetSectionNameEHFrame() { +ConstString ObjectFileMachO::GetSectionNameEHFrame() { static ConstString g_section_name_eh_frame("__eh_frame"); return g_section_name_eh_frame; } @@ -2426,12 +2426,12 @@ } } - const ConstString &g_segment_name_TEXT = GetSegmentNameTEXT(); - const ConstString &g_segment_name_DATA = GetSegmentNameDATA(); - const ConstString &g_segment_name_DATA_DIRTY = GetSegmentNameDATA_DIRTY(); - const ConstString &g_segment_name_DATA_CONST = GetSegmentNameDATA_CONST(); - const ConstString &g_segment_name_OBJC = GetSegmentNameOBJC(); - const ConstString &g_section_name_eh_frame = GetSectionNameEHFrame(); + ConstString g_segment_name_TEXT = GetSegmentNameTEXT(); + ConstString g_segment_name_DATA = GetSegmentNameDATA(); + ConstString g_segment_name_DATA_DIRTY = GetSegmentNameDATA_DIRTY(); + ConstString g_segment_name_DATA_CONST = GetSegmentNameDATA_CONST(); + ConstString g_segment_name_OBJC = GetSegmentNameOBJC(); + ConstString g_section_name_eh_frame = GetSectionNameEHFrame(); SectionSP text_section_sp( section_list->FindSectionByName(g_segment_name_TEXT)); SectionSP data_section_sp( Index: lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.h =================================================================== --- lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.h +++ lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.h @@ -77,7 +77,7 @@ typedef std::map dynamic_reg_size_map; const lldb_private::RegisterInfo * - GetRegisterInfo(const lldb_private::ConstString ®_name) const; + GetRegisterInfo(lldb_private::ConstString reg_name) const; void MoveFrom(DynamicRegisterInfo &&info); Index: lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp +++ lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp @@ -746,7 +746,7 @@ } const lldb_private::RegisterInfo *DynamicRegisterInfo::GetRegisterInfo( - const lldb_private::ConstString ®_name) const { + lldb_private::ConstString reg_name) const { for (auto ®_info : m_regs) { // We can use pointer comparison since we used a ConstString to set the // "name" member in AddRegister() Index: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h =================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h @@ -496,7 +496,7 @@ /// @see \b Process::ConfigureStructuredData(...) for details. //------------------------------------------------------------------ Status - ConfigureRemoteStructuredData(const ConstString &type_name, + ConfigureRemoteStructuredData(ConstString type_name, const StructuredData::ObjectSP &config_sp); lldb::user_id_t SendStartTracePacket(const TraceOptions &options, Index: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -3954,7 +3954,7 @@ } Status GDBRemoteCommunicationClient::ConfigureRemoteStructuredData( - const ConstString &type_name, const StructuredData::ObjectSP &config_sp) { + ConstString type_name, const StructuredData::ObjectSP &config_sp) { Status error; if (type_name.GetLength() == 0) { Index: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h =================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h +++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h @@ -234,7 +234,7 @@ lldb::addr_t image_count) override; Status - ConfigureStructuredData(const ConstString &type_name, + ConfigureStructuredData(ConstString type_name, const StructuredData::ObjectSP &config_sp) override; StructuredData::ObjectSP GetLoadedDynamicLibrariesInfos() override; Index: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -4213,7 +4213,7 @@ } Status ProcessGDBRemote::ConfigureStructuredData( - const ConstString &type_name, const StructuredData::ObjectSP &config_sp) { + ConstString type_name, const StructuredData::ObjectSP &config_sp) { return m_gdb_comm.ConfigureRemoteStructuredData(type_name, config_sp); } Index: lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h =================================================================== --- lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h +++ lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h @@ -32,7 +32,7 @@ static void Terminate(); - static const ConstString &GetStaticPluginName(); + static ConstString GetStaticPluginName(); // ------------------------------------------------------------------------- /// Return whether the DarwinLog functionality is enabled. @@ -60,16 +60,16 @@ // StructuredDataPlugin API // ------------------------------------------------------------------------- - bool SupportsStructuredDataType(const ConstString &type_name) override; + bool SupportsStructuredDataType(ConstString type_name) override; void HandleArrivalOfStructuredData( - Process &process, const ConstString &type_name, + Process &process, ConstString type_name, const StructuredData::ObjectSP &object_sp) override; Status GetDescription(const StructuredData::ObjectSP &object_sp, lldb_private::Stream &stream) override; - bool GetEnabled(const ConstString &type_name) const override; + bool GetEnabled(ConstString type_name) const override; void ModulesDidLoad(Process &process, ModuleList &module_list) override; Index: lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp =================================================================== --- lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp +++ lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp @@ -187,12 +187,12 @@ // used to format message text }; -static const ConstString &GetDarwinLogTypeName() { +static ConstString GetDarwinLogTypeName() { static const ConstString s_key_name("DarwinLog"); return s_key_name; } -static const ConstString &GetLogEventType() { +static ConstString GetLogEventType() { static const ConstString s_event_type("log"); return s_event_type; } @@ -208,13 +208,13 @@ std::function; - static void RegisterOperation(const ConstString &operation, + static void RegisterOperation(ConstString operation, const OperationCreationFunc &creation_func) { GetCreationFuncMap().insert(std::make_pair(operation, creation_func)); } static FilterRuleSP CreateRule(bool match_accepts, size_t attribute, - const ConstString &operation, + ConstString operation, const std::string &op_arg, Status &error) { // Find the creation func for this type of filter rule. auto map = GetCreationFuncMap(); @@ -252,10 +252,10 @@ virtual void Dump(Stream &stream) const = 0; - const ConstString &GetOperationType() const { return m_operation; } + ConstString GetOperationType() const { return m_operation; } protected: - FilterRule(bool accept, size_t attribute_index, const ConstString &operation) + FilterRule(bool accept, size_t attribute_index, ConstString operation) : m_accept(accept), m_attribute_index(attribute_index), m_operation(operation) {} @@ -324,7 +324,7 @@ return FilterRuleSP(new RegexFilterRule(accept, attribute_index, op_arg)); } - static const ConstString &StaticGetOperation() { + static ConstString StaticGetOperation() { static ConstString s_operation("regex"); return s_operation; } @@ -369,7 +369,7 @@ new ExactMatchFilterRule(accept, attribute_index, op_arg)); } - static const ConstString &StaticGetOperation() { + static ConstString StaticGetOperation() { static ConstString s_operation("match"); return s_operation; } @@ -918,7 +918,7 @@ process_sp->GetStructuredDataPlugin(GetDarwinLogTypeName()); stream.Printf("Availability: %s\n", plugin_sp ? "available" : "unavailable"); - auto &plugin_name = StructuredDataDarwinLog::GetStaticPluginName(); + ConstString plugin_name = StructuredDataDarwinLog::GetStaticPluginName(); const bool enabled = plugin_sp ? plugin_sp->GetEnabled(plugin_name) : false; stream.Printf("Enabled: %s\n", enabled ? "true" : "false"); @@ -1097,7 +1097,7 @@ PluginManager::UnregisterPlugin(&CreateInstance); } -const ConstString &StructuredDataDarwinLog::GetStaticPluginName() { +ConstString StructuredDataDarwinLog::GetStaticPluginName() { static ConstString s_plugin_name("darwin-log"); return s_plugin_name; } @@ -1123,12 +1123,12 @@ // ----------------------------------------------------------------------------- bool StructuredDataDarwinLog::SupportsStructuredDataType( - const ConstString &type_name) { + ConstString type_name) { return type_name == GetDarwinLogTypeName(); } void StructuredDataDarwinLog::HandleArrivalOfStructuredData( - Process &process, const ConstString &type_name, + Process &process, ConstString type_name, const StructuredData::ObjectSP &object_sp) { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS)); if (log) { @@ -1267,7 +1267,7 @@ return error; } -bool StructuredDataDarwinLog::GetEnabled(const ConstString &type_name) const { +bool StructuredDataDarwinLog::GetEnabled(ConstString type_name) const { if (type_name == GetStaticPluginName()) return m_is_enabled; else Index: lldb/trunk/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h +++ lldb/trunk/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h @@ -77,7 +77,7 @@ size_t ParseBlocksRecursive(Function &func) override { return 0; } - uint32_t FindGlobalVariables(const ConstString &name, + uint32_t FindGlobalVariables(ConstString name, const CompilerDeclContext *parent_decl_ctx, uint32_t max_matches, VariableList &variables) override { @@ -109,7 +109,7 @@ return 0; } - uint32_t FindFunctions(const ConstString &name, + uint32_t FindFunctions(ConstString name, const CompilerDeclContext *parent_decl_ctx, lldb::FunctionNameType name_type_mask, bool include_inlines, bool append, @@ -118,7 +118,7 @@ uint32_t FindFunctions(const RegularExpression ®ex, bool include_inlines, bool append, SymbolContextList &sc_list) override; - uint32_t FindTypes(const ConstString &name, + uint32_t FindTypes(ConstString name, const CompilerDeclContext *parent_decl_ctx, bool append, uint32_t max_matches, llvm::DenseSet &searched_symbol_files, @@ -132,7 +132,7 @@ } CompilerDeclContext - FindNamespace(const ConstString &name, + FindNamespace(ConstString name, const CompilerDeclContext *parent_decl_ctx) override { return CompilerDeclContext(); } Index: lldb/trunk/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp +++ lldb/trunk/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp @@ -286,7 +286,7 @@ } uint32_t SymbolFileBreakpad::FindFunctions( - const ConstString &name, const CompilerDeclContext *parent_decl_ctx, + ConstString name, const CompilerDeclContext *parent_decl_ctx, FunctionNameType name_type_mask, bool include_inlines, bool append, SymbolContextList &sc_list) { // TODO @@ -305,7 +305,7 @@ } uint32_t SymbolFileBreakpad::FindTypes( - const ConstString &name, const CompilerDeclContext *parent_decl_ctx, + ConstString name, const CompilerDeclContext *parent_decl_ctx, bool append, uint32_t max_matches, llvm::DenseSet &searched_symbol_files, TypeMap &types) { if (!append) Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/NameToDIE.h =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/NameToDIE.h +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/NameToDIE.h @@ -26,13 +26,13 @@ void Dump(lldb_private::Stream *s); - void Insert(const lldb_private::ConstString &name, const DIERef &die_ref); + void Insert(lldb_private::ConstString name, const DIERef &die_ref); void Append(const NameToDIE &other); void Finalize(); - size_t Find(const lldb_private::ConstString &name, + size_t Find(lldb_private::ConstString name, DIEArray &info_array) const; size_t Find(const lldb_private::RegularExpression ®ex, Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp @@ -25,11 +25,11 @@ m_map.SizeToFit(); } -void NameToDIE::Insert(const ConstString &name, const DIERef &die_ref) { +void NameToDIE::Insert(ConstString name, const DIERef &die_ref) { m_map.Append(name, die_ref); } -size_t NameToDIE::Find(const ConstString &name, DIEArray &info_array) const { +size_t NameToDIE::Find(ConstString name, DIEArray &info_array) const { return m_map.GetValues(name, info_array); } Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h @@ -169,7 +169,7 @@ lldb_private::SymbolContextList &sc_list) override; uint32_t - FindGlobalVariables(const lldb_private::ConstString &name, + FindGlobalVariables(lldb_private::ConstString name, const lldb_private::CompilerDeclContext *parent_decl_ctx, uint32_t max_matches, lldb_private::VariableList &variables) override; @@ -179,7 +179,7 @@ lldb_private::VariableList &variables) override; uint32_t - FindFunctions(const lldb_private::ConstString &name, + FindFunctions(lldb_private::ConstString name, const lldb_private::CompilerDeclContext *parent_decl_ctx, lldb::FunctionNameType name_type_mask, bool include_inlines, bool append, lldb_private::SymbolContextList &sc_list) override; @@ -193,7 +193,7 @@ std::vector &mangled_names) override; uint32_t - FindTypes(const lldb_private::ConstString &name, + FindTypes(lldb_private::ConstString name, const lldb_private::CompilerDeclContext *parent_decl_ctx, bool append, uint32_t max_matches, llvm::DenseSet &searched_symbol_files, @@ -212,7 +212,7 @@ GetTypeSystemForLanguage(lldb::LanguageType language) override; lldb_private::CompilerDeclContext FindNamespace( - const lldb_private::ConstString &name, + lldb_private::ConstString name, const lldb_private::CompilerDeclContext *parent_decl_ctx) override; void PreloadSymbols() override; @@ -393,11 +393,11 @@ FindDefinitionTypeForDWARFDeclContext(const DWARFDeclContext &die_decl_ctx); virtual lldb::TypeSP FindCompleteObjCDefinitionTypeForDIE( - const DWARFDIE &die, const lldb_private::ConstString &type_name, + const DWARFDIE &die, lldb_private::ConstString type_name, bool must_be_implementation); lldb_private::Symbol * - GetObjCClassSymbol(const lldb_private::ConstString &objc_class_name); + GetObjCClassSymbol(lldb_private::ConstString objc_class_name); lldb::TypeSP GetTypeForDIE(const DWARFDIE &die, bool resolve_function_context = false); @@ -421,7 +421,7 @@ bool DIEDeclContextsMatch(const DWARFDIE &die1, const DWARFDIE &die2); bool ClassContainsSelector(const DWARFDIE &class_die, - const lldb_private::ConstString &selector); + lldb_private::ConstString selector); bool FixupAddress(lldb_private::Address &addr); Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -367,7 +367,7 @@ SymbolFileDWARF::~SymbolFileDWARF() {} -static const ConstString &GetDWARFMachOSegmentName() { +static ConstString GetDWARFMachOSegmentName() { static ConstString g_dwarf_section_name("__DWARF"); return g_dwarf_section_name; } @@ -2020,7 +2020,7 @@ } uint32_t SymbolFileDWARF::FindGlobalVariables( - const ConstString &name, const CompilerDeclContext *parent_decl_ctx, + ConstString name, const CompilerDeclContext *parent_decl_ctx, uint32_t max_matches, VariableList &variables) { Log *log(LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS)); @@ -2246,7 +2246,7 @@ } uint32_t SymbolFileDWARF::FindFunctions( - const ConstString &name, const CompilerDeclContext *parent_decl_ctx, + ConstString name, const CompilerDeclContext *parent_decl_ctx, FunctionNameType name_type_mask, bool include_inlines, bool append, SymbolContextList &sc_list) { static Timer::Category func_cat(LLVM_PRETTY_FUNCTION); @@ -2391,7 +2391,7 @@ } uint32_t SymbolFileDWARF::FindTypes( - const ConstString &name, const CompilerDeclContext *parent_decl_ctx, + ConstString name, const CompilerDeclContext *parent_decl_ctx, bool append, uint32_t max_matches, llvm::DenseSet &searched_symbol_files, TypeMap &types) { @@ -2540,7 +2540,7 @@ } CompilerDeclContext -SymbolFileDWARF::FindNamespace(const ConstString &name, +SymbolFileDWARF::FindNamespace(ConstString name, const CompilerDeclContext *parent_decl_ctx) { Log *log(LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS)); @@ -2677,7 +2677,7 @@ } Symbol * -SymbolFileDWARF::GetObjCClassSymbol(const ConstString &objc_class_name) { +SymbolFileDWARF::GetObjCClassSymbol(ConstString objc_class_name) { Symbol *objc_class_symbol = NULL; if (m_obj_file) { Symtab *symtab = m_obj_file->GetSymtab(); @@ -2725,7 +2725,7 @@ // This function can be used when a DIE is found that is a forward declaration // DIE and we want to try and find a type that has the complete definition. TypeSP SymbolFileDWARF::FindCompleteObjCDefinitionTypeForDIE( - const DWARFDIE &die, const ConstString &type_name, + const DWARFDIE &die, ConstString type_name, bool must_be_implementation) { TypeSP type_sp; Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h @@ -98,7 +98,7 @@ lldb::SymbolContextItem resolve_scope, lldb_private::SymbolContextList &sc_list) override; uint32_t - FindGlobalVariables(const lldb_private::ConstString &name, + FindGlobalVariables(lldb_private::ConstString name, const lldb_private::CompilerDeclContext *parent_decl_ctx, uint32_t max_matches, lldb_private::VariableList &variables) override; @@ -106,7 +106,7 @@ uint32_t max_matches, lldb_private::VariableList &variables) override; uint32_t - FindFunctions(const lldb_private::ConstString &name, + FindFunctions(lldb_private::ConstString name, const lldb_private::CompilerDeclContext *parent_decl_ctx, lldb::FunctionNameType name_type_mask, bool include_inlines, bool append, lldb_private::SymbolContextList &sc_list) override; @@ -114,13 +114,13 @@ bool include_inlines, bool append, lldb_private::SymbolContextList &sc_list) override; uint32_t - FindTypes(const lldb_private::ConstString &name, + FindTypes(lldb_private::ConstString name, const lldb_private::CompilerDeclContext *parent_decl_ctx, bool append, uint32_t max_matches, llvm::DenseSet &searched_symbol_files, lldb_private::TypeMap &types) override; lldb_private::CompilerDeclContext FindNamespace( - const lldb_private::ConstString &name, + lldb_private::ConstString name, const lldb_private::CompilerDeclContext *parent_decl_ctx) override; size_t GetTypes(lldb_private::SymbolContextScope *sc_scope, lldb::TypeClass type_mask, @@ -246,7 +246,7 @@ const CompileUnitInfo *comp_unit_info); uint32_t PrivateFindGlobalVariables( - const lldb_private::ConstString &name, + lldb_private::ConstString name, const lldb_private::CompilerDeclContext *parent_decl_ctx, const std::vector &name_symbol_indexes, uint32_t max_matches, lldb_private::VariableList &variables); @@ -264,7 +264,7 @@ bool Supports_DW_AT_APPLE_objc_complete_type(SymbolFileDWARF *skip_dwarf_oso); lldb::TypeSP FindCompleteObjCDefinitionTypeForDIE( - const DWARFDIE &die, const lldb_private::ConstString &type_name, + const DWARFDIE &die, lldb_private::ConstString type_name, bool must_be_implementation); UniqueDWARFASTTypeMap &GetUniqueDWARFASTTypeMap() { Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp @@ -60,13 +60,11 @@ return file_range_map; Log *log(LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_MAP)); - if (log) { - ConstString object_name(oso_module->GetObjectName()); + if (log) log->Printf( "%p: SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap ('%s')", static_cast(this), oso_module->GetSpecificationDescription().c_str()); - } std::vector cu_infos; if (exe_symfile->GetCompUnitInfosForModule(oso_module, cu_infos)) { @@ -810,7 +808,7 @@ } uint32_t SymbolFileDWARFDebugMap::PrivateFindGlobalVariables( - const ConstString &name, const CompilerDeclContext *parent_decl_ctx, + ConstString name, const CompilerDeclContext *parent_decl_ctx, const std::vector &indexes, // Indexes into the symbol table that match "name" uint32_t max_matches, VariableList &variables) { @@ -834,7 +832,7 @@ } uint32_t SymbolFileDWARFDebugMap::FindGlobalVariables( - const ConstString &name, const CompilerDeclContext *parent_decl_ctx, + ConstString name, const CompilerDeclContext *parent_decl_ctx, uint32_t max_matches, VariableList &variables) { // Remember how many variables are in the list before we search. @@ -996,7 +994,7 @@ } uint32_t SymbolFileDWARFDebugMap::FindFunctions( - const ConstString &name, const CompilerDeclContext *parent_decl_ctx, + ConstString name, const CompilerDeclContext *parent_decl_ctx, FunctionNameType name_type_mask, bool include_inlines, bool append, SymbolContextList &sc_list) { static Timer::Category func_cat(LLVM_PRETTY_FUNCTION); @@ -1116,7 +1114,7 @@ } TypeSP SymbolFileDWARFDebugMap::FindCompleteObjCDefinitionTypeForDIE( - const DWARFDIE &die, const ConstString &type_name, + const DWARFDIE &die, ConstString type_name, bool must_be_implementation) { // If we have a debug map, we will have an Objective-C symbol whose name is // the type name and whose type is eSymbolTypeObjCClass. If we can find that @@ -1180,7 +1178,7 @@ } uint32_t SymbolFileDWARFDebugMap::FindTypes( - const ConstString &name, const CompilerDeclContext *parent_decl_ctx, + ConstString name, const CompilerDeclContext *parent_decl_ctx, bool append, uint32_t max_matches, llvm::DenseSet &searched_symbol_files, TypeMap &types) { @@ -1212,7 +1210,7 @@ //} CompilerDeclContext SymbolFileDWARFDebugMap::FindNamespace( - const lldb_private::ConstString &name, + lldb_private::ConstString name, const CompilerDeclContext *parent_decl_ctx) { CompilerDeclContext matching_namespace; Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h @@ -69,7 +69,7 @@ const DWARFDeclContext &die_decl_ctx) override; lldb::TypeSP FindCompleteObjCDefinitionTypeForDIE( - const DWARFDIE &die, const lldb_private::ConstString &type_name, + const DWARFDIE &die, lldb_private::ConstString type_name, bool must_be_implementation) override; SymbolFileDWARF *GetBaseSymbolFile(); Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp @@ -107,7 +107,7 @@ } lldb::TypeSP SymbolFileDWARFDwo::FindCompleteObjCDefinitionTypeForDIE( - const DWARFDIE &die, const lldb_private::ConstString &type_name, + const DWARFDIE &die, lldb_private::ConstString type_name, bool must_be_implementation) { return GetBaseSymbolFile()->FindCompleteObjCDefinitionTypeForDIE( die, type_name, must_be_implementation); Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.h =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.h +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.h @@ -80,12 +80,12 @@ ~UniqueDWARFASTTypeMap() {} - void Insert(const lldb_private::ConstString &name, + void Insert(lldb_private::ConstString name, const UniqueDWARFASTType &entry) { m_collection[name.GetCString()].Append(entry); } - bool Find(const lldb_private::ConstString &name, const DWARFDIE &die, + bool Find(lldb_private::ConstString name, const DWARFDIE &die, const lldb_private::Declaration &decl, const int32_t byte_size, UniqueDWARFASTType &entry) const { const char *unique_name_cstr = name.GetCString(); Index: lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h +++ lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h @@ -100,7 +100,7 @@ size_t ParseBlocksRecursive(Function &func) override; - uint32_t FindGlobalVariables(const ConstString &name, + uint32_t FindGlobalVariables(ConstString name, const CompilerDeclContext *parent_decl_ctx, uint32_t max_matches, VariableList &variables) override; @@ -129,7 +129,7 @@ size_t GetTypes(SymbolContextScope *sc_scope, lldb::TypeClass type_mask, TypeList &type_list) override; - uint32_t FindFunctions(const ConstString &name, + uint32_t FindFunctions(ConstString name, const CompilerDeclContext *parent_decl_ctx, lldb::FunctionNameType name_type_mask, bool include_inlines, bool append, @@ -138,7 +138,7 @@ uint32_t FindFunctions(const RegularExpression ®ex, bool include_inlines, bool append, SymbolContextList &sc_list) override; - uint32_t FindTypes(const ConstString &name, + uint32_t FindTypes(ConstString name, const CompilerDeclContext *parent_decl_ctx, bool append, uint32_t max_matches, llvm::DenseSet &searched_symbol_files, @@ -150,7 +150,7 @@ TypeSystem *GetTypeSystemForLanguage(lldb::LanguageType language) override; CompilerDeclContext - FindNamespace(const ConstString &name, + FindNamespace(ConstString name, const CompilerDeclContext *parent_decl_ctx) override; ConstString GetPluginName() override; Index: lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp +++ lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp @@ -1150,7 +1150,7 @@ void SymbolFileNativePDB::DumpClangAST(Stream &s) { m_ast->Dump(s); } uint32_t SymbolFileNativePDB::FindGlobalVariables( - const ConstString &name, const CompilerDeclContext *parent_decl_ctx, + ConstString name, const CompilerDeclContext *parent_decl_ctx, uint32_t max_matches, VariableList &variables) { using SymbolAndOffset = std::pair; @@ -1177,7 +1177,7 @@ } uint32_t SymbolFileNativePDB::FindFunctions( - const ConstString &name, const CompilerDeclContext *parent_decl_ctx, + ConstString name, const CompilerDeclContext *parent_decl_ctx, FunctionNameType name_type_mask, bool include_inlines, bool append, SymbolContextList &sc_list) { // For now we only support lookup by method name. @@ -1218,7 +1218,7 @@ } uint32_t SymbolFileNativePDB::FindTypes( - const ConstString &name, const CompilerDeclContext *parent_decl_ctx, + ConstString name, const CompilerDeclContext *parent_decl_ctx, bool append, uint32_t max_matches, llvm::DenseSet &searched_symbol_files, TypeMap &types) { if (!append) @@ -1550,7 +1550,7 @@ } CompilerDeclContext -SymbolFileNativePDB::FindNamespace(const ConstString &name, +SymbolFileNativePDB::FindNamespace(ConstString name, const CompilerDeclContext *parent_decl_ctx) { return {}; } Index: lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h +++ lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h @@ -110,7 +110,7 @@ lldb_private::SymbolContextList &sc_list) override; uint32_t - FindGlobalVariables(const lldb_private::ConstString &name, + FindGlobalVariables(lldb_private::ConstString name, const lldb_private::CompilerDeclContext *parent_decl_ctx, uint32_t max_matches, lldb_private::VariableList &variables) override; @@ -120,7 +120,7 @@ lldb_private::VariableList &variables) override; uint32_t - FindFunctions(const lldb_private::ConstString &name, + FindFunctions(lldb_private::ConstString name, const lldb_private::CompilerDeclContext *parent_decl_ctx, lldb::FunctionNameType name_type_mask, bool include_inlines, bool append, lldb_private::SymbolContextList &sc_list) override; @@ -136,7 +136,7 @@ void AddSymbols(lldb_private::Symtab &symtab) override; uint32_t - FindTypes(const lldb_private::ConstString &name, + FindTypes(lldb_private::ConstString name, const lldb_private::CompilerDeclContext *parent_decl_ctx, bool append, uint32_t max_matches, llvm::DenseSet &searched_symbol_files, @@ -158,7 +158,7 @@ GetTypeSystemForLanguage(lldb::LanguageType language) override; lldb_private::CompilerDeclContext FindNamespace( - const lldb_private::ConstString &name, + lldb_private::ConstString name, const lldb_private::CompilerDeclContext *parent_decl_ctx) override; lldb_private::ConstString GetPluginName() override; Index: lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp +++ lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp @@ -1046,7 +1046,7 @@ } uint32_t SymbolFilePDB::FindGlobalVariables( - const lldb_private::ConstString &name, + lldb_private::ConstString name, const lldb_private::CompilerDeclContext *parent_decl_ctx, uint32_t max_matches, lldb_private::VariableList &variables) { if (!DeclContextMatchesThisSymbolFile(parent_decl_ctx)) @@ -1246,7 +1246,7 @@ } uint32_t SymbolFilePDB::FindFunctions( - const lldb_private::ConstString &name, + lldb_private::ConstString name, const lldb_private::CompilerDeclContext *parent_decl_ctx, FunctionNameType name_type_mask, bool include_inlines, bool append, lldb_private::SymbolContextList &sc_list) { @@ -1386,7 +1386,7 @@ } uint32_t SymbolFilePDB::FindTypes( - const lldb_private::ConstString &name, + lldb_private::ConstString name, const lldb_private::CompilerDeclContext *parent_decl_ctx, bool append, uint32_t max_matches, llvm::DenseSet &searched_symbol_files, @@ -1628,7 +1628,7 @@ lldb_private::CompilerDeclContext SymbolFilePDB::FindNamespace( - const lldb_private::ConstString &name, + lldb_private::ConstString name, const lldb_private::CompilerDeclContext *parent_decl_ctx) { auto type_system = GetTypeSystemForLanguage(lldb::eLanguageTypeC_plus_plus); auto clang_type_system = llvm::dyn_cast_or_null(type_system); Index: lldb/trunk/source/Symbol/ClangASTContext.cpp =================================================================== --- lldb/trunk/source/Symbol/ClangASTContext.cpp +++ lldb/trunk/source/Symbol/ClangASTContext.cpp @@ -1065,7 +1065,7 @@ } lldb::BasicType -ClangASTContext::GetBasicTypeEnumeration(const ConstString &name) { +ClangASTContext::GetBasicTypeEnumeration(ConstString name) { if (name) { typedef UniqueCStringMap TypeNameToBasicTypeMap; static TypeNameToBasicTypeMap g_type_map; @@ -1131,7 +1131,7 @@ } CompilerType ClangASTContext::GetBasicType(ASTContext *ast, - const ConstString &name) { + ConstString name) { if (ast) { lldb::BasicType basic_type = ClangASTContext::GetBasicTypeEnumeration(name); return ClangASTContext::GetBasicType(ast, basic_type); @@ -2272,7 +2272,7 @@ } CompilerType ClangASTContext::CreateStructForIdentifier( - const ConstString &type_name, + ConstString type_name, const std::initializer_list> &type_fields, bool packed) { @@ -2297,7 +2297,7 @@ } CompilerType ClangASTContext::GetOrCreateStructForIdentifier( - const ConstString &type_name, + ConstString type_name, const std::initializer_list> &type_fields, bool packed) { @@ -5739,7 +5739,7 @@ return num_children; } -CompilerType ClangASTContext::GetBuiltinTypeByName(const ConstString &name) { +CompilerType ClangASTContext::GetBuiltinTypeByName(ConstString name) { return GetBasicType(GetBasicTypeEnumeration(name)); } @@ -5819,7 +5819,7 @@ void ClangASTContext::ForEachEnumerator( lldb::opaque_compiler_type_t type, std::function const &callback) { const clang::EnumType *enum_type = llvm::dyn_cast(GetCanonicalQualType(type)); Index: lldb/trunk/source/Symbol/CompilerType.cpp =================================================================== --- lldb/trunk/source/Symbol/CompilerType.cpp +++ lldb/trunk/source/Symbol/CompilerType.cpp @@ -553,7 +553,7 @@ void CompilerType::ForEachEnumerator( std::function const &callback) const { if (IsValid()) return m_type_system->ForEachEnumerator(m_type, callback); Index: lldb/trunk/source/Symbol/Function.cpp =================================================================== --- lldb/trunk/source/Symbol/Function.cpp +++ lldb/trunk/source/Symbol/Function.cpp @@ -31,7 +31,7 @@ FunctionInfo::FunctionInfo(const char *name, const Declaration *decl_ptr) : m_name(name), m_declaration(decl_ptr) {} -FunctionInfo::FunctionInfo(const ConstString &name, const Declaration *decl_ptr) +FunctionInfo::FunctionInfo(ConstString name, const Declaration *decl_ptr) : m_name(name), m_declaration(decl_ptr) {} FunctionInfo::~FunctionInfo() {} @@ -68,7 +68,7 @@ : FunctionInfo(name, decl_ptr), m_mangled(ConstString(mangled), true), m_call_decl(call_decl_ptr) {} -InlineFunctionInfo::InlineFunctionInfo(const ConstString &name, +InlineFunctionInfo::InlineFunctionInfo(ConstString name, const Mangled &mangled, const Declaration *decl_ptr, const Declaration *call_decl_ptr) Index: lldb/trunk/source/Symbol/LocateSymbolFile.cpp =================================================================== --- lldb/trunk/source/Symbol/LocateSymbolFile.cpp +++ lldb/trunk/source/Symbol/LocateSymbolFile.cpp @@ -270,7 +270,7 @@ FileSystem::Instance().ResolveSymbolicLink(module_file_spec, module_file_spec); - const ConstString &file_dir = module_file_spec.GetDirectory(); + ConstString file_dir = module_file_spec.GetDirectory(); { FileSpec file_spec(file_dir.AsCString(".")); FileSystem::Instance().Resolve(file_spec); Index: lldb/trunk/source/Symbol/Symbol.cpp =================================================================== --- lldb/trunk/source/Symbol/Symbol.cpp +++ lldb/trunk/source/Symbol/Symbol.cpp @@ -145,7 +145,7 @@ return FileSpec(); } -void Symbol::SetReExportedSymbolName(const ConstString &name) { +void Symbol::SetReExportedSymbolName(ConstString name) { SetType(eSymbolTypeReExported); // For eSymbolTypeReExported, the "const char *" from a ConstString is used // as the offset in the address range base address. @@ -325,7 +325,7 @@ return 0; } -bool Symbol::Compare(const ConstString &name, SymbolType type) const { +bool Symbol::Compare(ConstString name, SymbolType type) const { if (type == eSymbolTypeAny || m_type == type) return m_mangled.GetMangledName() == name || m_mangled.GetDemangledName(GetLanguage()) == name; Index: lldb/trunk/source/Symbol/SymbolContext.cpp =================================================================== --- lldb/trunk/source/Symbol/SymbolContext.cpp +++ lldb/trunk/source/Symbol/SymbolContext.cpp @@ -793,7 +793,7 @@ } const Symbol * -SymbolContext::FindBestGlobalDataSymbol(const ConstString &name, Status &error) { +SymbolContext::FindBestGlobalDataSymbol(ConstString name, Status &error) { error.Clear(); if (!target_sp) { Index: lldb/trunk/source/Symbol/SymbolFile.cpp =================================================================== --- lldb/trunk/source/Symbol/SymbolFile.cpp +++ lldb/trunk/source/Symbol/SymbolFile.cpp @@ -102,7 +102,7 @@ } uint32_t -SymbolFile::FindGlobalVariables(const ConstString &name, +SymbolFile::FindGlobalVariables(ConstString name, const CompilerDeclContext *parent_decl_ctx, uint32_t max_matches, VariableList &variables) { return 0; @@ -114,7 +114,7 @@ return 0; } -uint32_t SymbolFile::FindFunctions(const ConstString &name, +uint32_t SymbolFile::FindFunctions(ConstString name, const CompilerDeclContext *parent_decl_ctx, lldb::FunctionNameType name_type_mask, bool include_inlines, bool append, @@ -139,7 +139,7 @@ } uint32_t SymbolFile::FindTypes( - const ConstString &name, const CompilerDeclContext *parent_decl_ctx, + ConstString name, const CompilerDeclContext *parent_decl_ctx, bool append, uint32_t max_matches, llvm::DenseSet &searched_symbol_files, TypeMap &types) { Index: lldb/trunk/source/Symbol/SymbolVendor.cpp =================================================================== --- lldb/trunk/source/Symbol/SymbolVendor.cpp +++ lldb/trunk/source/Symbol/SymbolVendor.cpp @@ -262,7 +262,7 @@ } size_t -SymbolVendor::FindGlobalVariables(const ConstString &name, +SymbolVendor::FindGlobalVariables(ConstString name, const CompilerDeclContext *parent_decl_ctx, size_t max_matches, VariableList &variables) { ModuleSP module_sp(GetModule()); @@ -287,7 +287,7 @@ return 0; } -size_t SymbolVendor::FindFunctions(const ConstString &name, +size_t SymbolVendor::FindFunctions(ConstString name, const CompilerDeclContext *parent_decl_ctx, FunctionNameType name_type_mask, bool include_inlines, bool append, @@ -316,7 +316,7 @@ } size_t SymbolVendor::FindTypes( - const ConstString &name, const CompilerDeclContext *parent_decl_ctx, + ConstString name, const CompilerDeclContext *parent_decl_ctx, bool append, size_t max_matches, llvm::DenseSet &searched_symbol_files, TypeMap &types) { @@ -358,7 +358,7 @@ } CompilerDeclContext -SymbolVendor::FindNamespace(const ConstString &name, +SymbolVendor::FindNamespace(ConstString name, const CompilerDeclContext *parent_decl_ctx) { CompilerDeclContext namespace_decl_ctx; ModuleSP module_sp(GetModule()); Index: lldb/trunk/source/Symbol/Symtab.cpp =================================================================== --- lldb/trunk/source/Symbol/Symtab.cpp +++ lldb/trunk/source/Symbol/Symtab.cpp @@ -625,7 +625,7 @@ } } -uint32_t Symtab::AppendSymbolIndexesWithName(const ConstString &symbol_name, +uint32_t Symtab::AppendSymbolIndexesWithName(ConstString symbol_name, std::vector &indexes) { std::lock_guard guard(m_mutex); @@ -640,7 +640,7 @@ return 0; } -uint32_t Symtab::AppendSymbolIndexesWithName(const ConstString &symbol_name, +uint32_t Symtab::AppendSymbolIndexesWithName(ConstString symbol_name, Debug symbol_debug_type, Visibility symbol_visibility, std::vector &indexes) { @@ -667,7 +667,7 @@ } uint32_t -Symtab::AppendSymbolIndexesWithNameAndType(const ConstString &symbol_name, +Symtab::AppendSymbolIndexesWithNameAndType(ConstString symbol_name, SymbolType symbol_type, std::vector &indexes) { std::lock_guard guard(m_mutex); @@ -686,7 +686,7 @@ } uint32_t Symtab::AppendSymbolIndexesWithNameAndType( - const ConstString &symbol_name, SymbolType symbol_type, + ConstString symbol_name, SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector &indexes) { std::lock_guard guard(m_mutex); @@ -771,7 +771,7 @@ } size_t -Symtab::FindAllSymbolsWithNameAndType(const ConstString &name, +Symtab::FindAllSymbolsWithNameAndType(ConstString name, SymbolType symbol_type, std::vector &symbol_indexes) { std::lock_guard guard(m_mutex); @@ -792,7 +792,7 @@ } size_t Symtab::FindAllSymbolsWithNameAndType( - const ConstString &name, SymbolType symbol_type, Debug symbol_debug_type, + ConstString name, SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector &symbol_indexes) { std::lock_guard guard(m_mutex); @@ -823,7 +823,7 @@ return symbol_indexes.size(); } -Symbol *Symtab::FindFirstSymbolWithNameAndType(const ConstString &name, +Symbol *Symtab::FindFirstSymbolWithNameAndType(ConstString name, SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility) { @@ -1050,7 +1050,7 @@ } } -size_t Symtab::FindFunctionSymbols(const ConstString &name, +size_t Symtab::FindFunctionSymbols(ConstString name, uint32_t name_type_mask, SymbolContextList &sc_list) { size_t count = 0; Index: lldb/trunk/source/Symbol/Type.cpp =================================================================== --- lldb/trunk/source/Symbol/Type.cpp +++ lldb/trunk/source/Symbol/Type.cpp @@ -107,7 +107,7 @@ } Type::Type(lldb::user_id_t uid, SymbolFile *symbol_file, - const ConstString &name, llvm::Optional byte_size, + ConstString name, llvm::Optional byte_size, SymbolContextScope *context, user_id_t encoding_uid, EncodingDataType encoding_uid_type, const Declaration &decl, const CompilerType &compiler_type, @@ -153,7 +153,7 @@ // Call the name accessor to make sure we resolve the type name if (show_name) { - const ConstString &type_name = GetName(); + ConstString type_name = GetName(); if (type_name) { *s << ", name = \"" << type_name << '"'; ConstString qualified_type_name(GetQualifiedName()); @@ -272,7 +272,7 @@ s->EOL(); } -const ConstString &Type::GetName() { +ConstString Type::GetName() { if (!m_name) m_name = GetForwardCompilerType().GetConstTypeName(); return m_name; @@ -734,7 +734,7 @@ return ConstString(""); } -void TypeAndOrName::SetName(const ConstString &type_name) { +void TypeAndOrName::SetName(ConstString type_name) { m_type_name = type_name; } @@ -1104,7 +1104,7 @@ } TypeEnumMemberImpl::TypeEnumMemberImpl(const lldb::TypeImplSP &integer_type_sp, - const ConstString &name, + ConstString name, const llvm::APSInt &value) : m_integer_type_sp(integer_type_sp), m_name(name), m_value(value), m_valid((bool)name && (bool)integer_type_sp) Index: lldb/trunk/source/Symbol/TypeList.cpp =================================================================== --- lldb/trunk/source/Symbol/TypeList.cpp +++ lldb/trunk/source/Symbol/TypeList.cpp @@ -49,7 +49,7 @@ // Find a type by name. //---------------------------------------------------------------------- // TypeList -// TypeList::FindTypes (const ConstString &name) +// TypeList::FindTypes (ConstString name) //{ // // Do we ever need to make a lookup by name map? Here we are doing // // a linear search which isn't going to be fast. Index: lldb/trunk/source/Symbol/TypeMap.cpp =================================================================== --- lldb/trunk/source/Symbol/TypeMap.cpp +++ lldb/trunk/source/Symbol/TypeMap.cpp @@ -77,7 +77,7 @@ // Find a type by name. //---------------------------------------------------------------------- // TypeMap -// TypeMap::FindTypes (const ConstString &name) +// TypeMap::FindTypes (ConstString name) //{ // // Do we ever need to make a lookup by name map? Here we are doing // // a linear search which isn't going to be fast. Index: lldb/trunk/source/Symbol/TypeSystem.cpp =================================================================== --- lldb/trunk/source/Symbol/TypeSystem.cpp +++ lldb/trunk/source/Symbol/TypeSystem.cpp @@ -92,7 +92,7 @@ return CompilerType(); } -CompilerType TypeSystem::GetBuiltinTypeByName(const ConstString &name) { +CompilerType TypeSystem::GetBuiltinTypeByName(ConstString name) { return CompilerType(); } Index: lldb/trunk/source/Symbol/Variable.cpp =================================================================== --- lldb/trunk/source/Symbol/Variable.cpp +++ lldb/trunk/source/Symbol/Variable.cpp @@ -74,7 +74,7 @@ ConstString Variable::GetUnqualifiedName() const { return m_name; } -bool Variable::NameMatches(const ConstString &name) const { +bool Variable::NameMatches(ConstString name) const { if (m_name == name) return true; SymbolContext variable_sc; Index: lldb/trunk/source/Symbol/VariableList.cpp =================================================================== --- lldb/trunk/source/Symbol/VariableList.cpp +++ lldb/trunk/source/Symbol/VariableList.cpp @@ -73,7 +73,7 @@ return UINT32_MAX; } -VariableSP VariableList::FindVariable(const ConstString &name, +VariableSP VariableList::FindVariable(ConstString name, bool include_static_members) { VariableSP var_sp; iterator pos, end = m_variables.end(); @@ -88,7 +88,7 @@ return var_sp; } -VariableSP VariableList::FindVariable(const ConstString &name, +VariableSP VariableList::FindVariable(ConstString name, lldb::ValueType value_type, bool include_static_members) { VariableSP var_sp; Index: lldb/trunk/source/Target/ABI.cpp =================================================================== --- lldb/trunk/source/Target/ABI.cpp +++ lldb/trunk/source/Target/ABI.cpp @@ -39,7 +39,7 @@ ABI::~ABI() = default; -bool ABI::GetRegisterInfoByName(const ConstString &name, RegisterInfo &info) { +bool ABI::GetRegisterInfoByName(ConstString name, RegisterInfo &info) { uint32_t count = 0; const RegisterInfo *register_info_array = GetRegisterInfoArray(count); if (register_info_array) { Index: lldb/trunk/source/Target/ObjCLanguageRuntime.cpp =================================================================== --- lldb/trunk/source/Target/ObjCLanguageRuntime.cpp +++ lldb/trunk/source/Target/ObjCLanguageRuntime.cpp @@ -153,7 +153,7 @@ } ObjCLanguageRuntime::ObjCISA -ObjCLanguageRuntime::GetISA(const ConstString &name) { +ObjCLanguageRuntime::GetISA(ConstString name) { ISAToDescriptorIterator pos = GetDescriptorIterator(name); if (pos != m_isa_to_descriptor.end()) return pos->first; @@ -161,7 +161,7 @@ } ObjCLanguageRuntime::ISAToDescriptorIterator -ObjCLanguageRuntime::GetDescriptorIterator(const ConstString &name) { +ObjCLanguageRuntime::GetDescriptorIterator(ConstString name) { ISAToDescriptorIterator end = m_isa_to_descriptor.end(); if (name) { @@ -226,7 +226,7 @@ ObjCLanguageRuntime::ClassDescriptorSP ObjCLanguageRuntime::GetClassDescriptorFromClassName( - const ConstString &class_name) { + ConstString class_name) { ISAToDescriptorIterator pos = GetDescriptorIterator(class_name); if (pos != m_isa_to_descriptor.end()) return pos->second; Index: lldb/trunk/source/Target/PathMappingList.cpp =================================================================== --- lldb/trunk/source/Target/PathMappingList.cpp +++ lldb/trunk/source/Target/PathMappingList.cpp @@ -30,7 +30,7 @@ // with the raw path pair, which doesn't work anymore because the paths have // been normalized when the debug info was loaded. So we need to store // nomalized path pairs to ensure things match up. - ConstString NormalizePath(const ConstString &path) { + ConstString NormalizePath(ConstString path) { // If we use "path" to construct a FileSpec, it will normalize the path for // us. We then grab the string and turn it back into a ConstString. return ConstString(FileSpec(path.GetStringRef()).GetPath()); @@ -62,8 +62,8 @@ PathMappingList::~PathMappingList() = default; -void PathMappingList::Append(const ConstString &path, - const ConstString &replacement, bool notify) { +void PathMappingList::Append(ConstString path, + ConstString replacement, bool notify) { ++m_mod_id; m_pairs.emplace_back(pair(NormalizePath(path), NormalizePath(replacement))); if (notify && m_callback) @@ -81,8 +81,8 @@ } } -void PathMappingList::Insert(const ConstString &path, - const ConstString &replacement, uint32_t index, +void PathMappingList::Insert(ConstString path, + ConstString replacement, uint32_t index, bool notify) { ++m_mod_id; iterator insert_iter; @@ -96,8 +96,8 @@ m_callback(*this, m_callback_baton); } -bool PathMappingList::Replace(const ConstString &path, - const ConstString &replacement, uint32_t index, +bool PathMappingList::Replace(ConstString path, + ConstString replacement, uint32_t index, bool notify) { if (index >= m_pairs.size()) return false; @@ -146,7 +146,7 @@ m_callback(*this, m_callback_baton); } -bool PathMappingList::RemapPath(const ConstString &path, +bool PathMappingList::RemapPath(ConstString path, ConstString &new_path) const { std::string remapped; if (RemapPath(path.GetStringRef(), remapped)) { @@ -244,8 +244,8 @@ return false; } -bool PathMappingList::Replace(const ConstString &path, - const ConstString &new_path, bool notify) { +bool PathMappingList::Replace(ConstString path, + ConstString new_path, bool notify) { uint32_t idx = FindIndexForPath(path); if (idx < m_pairs.size()) { ++m_mod_id; @@ -257,7 +257,7 @@ return false; } -bool PathMappingList::Remove(const ConstString &path, bool notify) { +bool PathMappingList::Remove(ConstString path, bool notify) { iterator pos = FindIteratorForPath(path); if (pos != m_pairs.end()) { ++m_mod_id; @@ -270,7 +270,7 @@ } PathMappingList::const_iterator -PathMappingList::FindIteratorForPath(const ConstString &path) const { +PathMappingList::FindIteratorForPath(ConstString path) const { const_iterator pos; const_iterator begin = m_pairs.begin(); const_iterator end = m_pairs.end(); @@ -283,7 +283,7 @@ } PathMappingList::iterator -PathMappingList::FindIteratorForPath(const ConstString &path) { +PathMappingList::FindIteratorForPath(ConstString path) { iterator pos; iterator begin = m_pairs.begin(); iterator end = m_pairs.end(); @@ -305,7 +305,7 @@ return false; } -uint32_t PathMappingList::FindIndexForPath(const ConstString &orig_path) const { +uint32_t PathMappingList::FindIndexForPath(ConstString orig_path) const { const ConstString path = NormalizePath(orig_path); const_iterator pos; const_iterator begin = m_pairs.begin(); Index: lldb/trunk/source/Target/Platform.cpp =================================================================== --- lldb/trunk/source/Target/Platform.cpp +++ lldb/trunk/source/Target/Platform.cpp @@ -180,7 +180,7 @@ } // PlatformSP -// Platform::FindPlugin (Process *process, const ConstString &plugin_name) +// Platform::FindPlugin (Process *process, ConstString plugin_name) //{ // PlatformCreateInstance create_callback = nullptr; // if (plugin_name) @@ -267,7 +267,7 @@ module_spec); } -PlatformSP Platform::Find(const ConstString &name) { +PlatformSP Platform::Find(ConstString name) { if (name) { static ConstString g_host_platform_name("host"); if (name == g_host_platform_name) @@ -282,7 +282,7 @@ return PlatformSP(); } -PlatformSP Platform::Create(const ConstString &name, Status &error) { +PlatformSP Platform::Create(ConstString name, Status &error) { PlatformCreateInstance create_callback = nullptr; lldb::PlatformSP platform_sp; if (name) { Index: lldb/trunk/source/Target/Process.cpp =================================================================== --- lldb/trunk/source/Target/Process.cpp +++ lldb/trunk/source/Target/Process.cpp @@ -84,7 +84,7 @@ class ProcessOptionValueProperties : public OptionValueProperties { public: - ProcessOptionValueProperties(const ConstString &name) + ProcessOptionValueProperties(ConstString name) : OptionValueProperties(name) {} // This constructor is used when creating ProcessOptionValueProperties when @@ -3915,12 +3915,12 @@ Process::ProcessEventData::~ProcessEventData() = default; -const ConstString &Process::ProcessEventData::GetFlavorString() { +ConstString Process::ProcessEventData::GetFlavorString() { static ConstString g_flavor("Process::ProcessEventData"); return g_flavor; } -const ConstString &Process::ProcessEventData::GetFlavor() const { +ConstString Process::ProcessEventData::GetFlavor() const { return ProcessEventData::GetFlavorString(); } @@ -4243,7 +4243,7 @@ } StructuredDataPluginSP -Process::GetStructuredDataPlugin(const ConstString &type_name) const { +Process::GetStructuredDataPlugin(ConstString type_name) const { auto find_it = m_structured_data_plugin_map.find(type_name); if (find_it != m_structured_data_plugin_map.end()) return find_it->second; @@ -5867,7 +5867,7 @@ } Status -Process::ConfigureStructuredData(const ConstString &type_name, +Process::ConfigureStructuredData(ConstString type_name, const StructuredData::ObjectSP &config_sp) { // If you get this, the Process-derived class needs to implement a method to // enable an already-reported asynchronous structured data feature. See Index: lldb/trunk/source/Target/StackFrameRecognizer.cpp =================================================================== --- lldb/trunk/source/Target/StackFrameRecognizer.cpp +++ lldb/trunk/source/Target/StackFrameRecognizer.cpp @@ -55,7 +55,7 @@ class StackFrameRecognizerManagerImpl { public: void AddRecognizer(StackFrameRecognizerSP recognizer, - const ConstString &module, const ConstString &symbol, + ConstString module, ConstString symbol, bool first_instruction_only) { m_recognizers.push_front({(uint32_t)m_recognizers.size(), false, recognizer, false, module, RegularExpressionSP(), symbol, RegularExpressionSP(), @@ -158,8 +158,8 @@ } void StackFrameRecognizerManager::AddRecognizer( - StackFrameRecognizerSP recognizer, const ConstString &module, - const ConstString &symbol, bool first_instruction_only) { + StackFrameRecognizerSP recognizer, ConstString module, + ConstString symbol, bool first_instruction_only) { GetStackFrameRecognizerManagerImpl().AddRecognizer(recognizer, module, symbol, first_instruction_only); } Index: lldb/trunk/source/Target/StructuredDataPlugin.cpp =================================================================== --- lldb/trunk/source/Target/StructuredDataPlugin.cpp +++ lldb/trunk/source/Target/StructuredDataPlugin.cpp @@ -32,7 +32,7 @@ StructuredDataPlugin::~StructuredDataPlugin() {} -bool StructuredDataPlugin::GetEnabled(const ConstString &type_name) const { +bool StructuredDataPlugin::GetEnabled(ConstString type_name) const { // By default, plugins are always enabled. Plugin authors should override // this if there is an enabled/disabled state for their plugin. return true; Index: lldb/trunk/source/Target/Target.cpp =================================================================== --- lldb/trunk/source/Target/Target.cpp +++ lldb/trunk/source/Target/Target.cpp @@ -701,7 +701,7 @@ m_breakpoint_names.insert(std::make_pair(bp_name->GetName(), bp_name)); } -BreakpointName *Target::FindBreakpointName(const ConstString &name, +BreakpointName *Target::FindBreakpointName(ConstString name, bool can_create, Status &error) { @@ -726,7 +726,7 @@ } void -Target::DeleteBreakpointName(const ConstString &name) +Target::DeleteBreakpointName(ConstString name) { BreakpointNameList::iterator iter = m_breakpoint_names.find(name); @@ -739,7 +739,7 @@ } void Target::RemoveNameFromBreakpoint(lldb::BreakpointSP &bp_sp, - const ConstString &name) + ConstString name) { bp_sp->RemoveName(name.AsCString()); } @@ -2414,7 +2414,7 @@ } lldb::ExpressionVariableSP -Target::GetPersistentVariable(const ConstString &name) { +Target::GetPersistentVariable(ConstString name) { lldb::ExpressionVariableSP variable_sp; m_scratch_type_system_map.ForEach( [name, &variable_sp](TypeSystem *type_system) -> bool { @@ -2430,7 +2430,7 @@ return variable_sp; } -lldb::addr_t Target::GetPersistentSymbol(const ConstString &name) { +lldb::addr_t Target::GetPersistentSymbol(ConstString name) { lldb::addr_t address = LLDB_INVALID_ADDRESS; m_scratch_type_system_map.ForEach( @@ -3502,7 +3502,7 @@ class TargetOptionValueProperties : public OptionValueProperties { public: - TargetOptionValueProperties(const ConstString &name) + TargetOptionValueProperties(ConstString name) : OptionValueProperties(name), m_target(nullptr), m_got_host_env(false) {} // This constructor is used when creating TargetOptionValueProperties when it @@ -4206,7 +4206,7 @@ Target::TargetEventData::~TargetEventData() = default; -const ConstString &Target::TargetEventData::GetFlavorString() { +ConstString Target::TargetEventData::GetFlavorString() { static ConstString g_flavor("Target::TargetEventData"); return g_flavor; } Index: lldb/trunk/source/Target/Thread.cpp =================================================================== --- lldb/trunk/source/Target/Thread.cpp +++ lldb/trunk/source/Target/Thread.cpp @@ -92,7 +92,7 @@ class ThreadOptionValueProperties : public OptionValueProperties { public: - ThreadOptionValueProperties(const ConstString &name) + ThreadOptionValueProperties(ConstString name) : OptionValueProperties(name) {} // This constructor is used when creating ThreadOptionValueProperties when it @@ -175,7 +175,7 @@ // Thread Event Data //------------------------------------------------------------------ -const ConstString &Thread::ThreadEventData::GetFlavorString() { +ConstString Thread::ThreadEventData::GetFlavorString() { static ConstString g_flavor("Thread::ThreadEventData"); return g_flavor; } Index: lldb/trunk/source/Utility/ArchSpec.cpp =================================================================== --- lldb/trunk/source/Utility/ArchSpec.cpp +++ lldb/trunk/source/Utility/ArchSpec.cpp @@ -763,7 +763,7 @@ return llvm::Triple::UnknownArch; } -const ConstString &ArchSpec::GetDistributionId() const { +ConstString ArchSpec::GetDistributionId() const { return m_distribution_id; } Index: lldb/trunk/source/Utility/ConstString.cpp =================================================================== --- lldb/trunk/source/Utility/ConstString.cpp +++ lldb/trunk/source/Utility/ConstString.cpp @@ -206,7 +206,7 @@ ConstString::ConstString(const llvm::StringRef &s) : m_string(StringPool().GetConstCStringWithLength(s.data(), s.size())) {} -bool ConstString::operator<(const ConstString &rhs) const { +bool ConstString::operator<(ConstString rhs) const { if (m_string == rhs.m_string) return false; @@ -221,7 +221,7 @@ return lhs_string_ref.data() == nullptr; } -Stream &lldb_private::operator<<(Stream &s, const ConstString &str) { +Stream &lldb_private::operator<<(Stream &s, ConstString str) { const char *cstr = str.GetCString(); if (cstr != nullptr) s << cstr; @@ -233,7 +233,7 @@ return Pool::GetConstCStringLength(m_string); } -bool ConstString::Equals(const ConstString &lhs, const ConstString &rhs, +bool ConstString::Equals(ConstString lhs, ConstString rhs, const bool case_sensitive) { if (lhs.m_string == rhs.m_string) return true; @@ -250,7 +250,7 @@ return lhs_string_ref.equals_lower(rhs_string_ref); } -int ConstString::Compare(const ConstString &lhs, const ConstString &rhs, +int ConstString::Compare(ConstString lhs, ConstString rhs, const bool case_sensitive) { // If the iterators are the same, this is the same string const char *lhs_cstr = lhs.m_string; @@ -302,7 +302,7 @@ } void ConstString::SetStringWithMangledCounterpart(llvm::StringRef demangled, - const ConstString &mangled) { + ConstString mangled) { m_string = StringPool().GetConstCStringAndSetMangledCounterPart( demangled, mangled.m_string); } Index: lldb/trunk/source/Utility/Event.cpp =================================================================== --- lldb/trunk/source/Utility/Event.cpp +++ lldb/trunk/source/Utility/Event.cpp @@ -120,12 +120,12 @@ EventDataBytes::~EventDataBytes() = default; -const ConstString &EventDataBytes::GetFlavorString() { +ConstString EventDataBytes::GetFlavorString() { static ConstString g_flavor("EventDataBytes"); return g_flavor; } -const ConstString &EventDataBytes::GetFlavor() const { +ConstString EventDataBytes::GetFlavor() const { return EventDataBytes::GetFlavorString(); } @@ -212,7 +212,7 @@ // EventDataStructuredData member functions //------------------------------------------------------------------ -const ConstString &EventDataStructuredData::GetFlavor() const { +ConstString EventDataStructuredData::GetFlavor() const { return EventDataStructuredData::GetFlavorString(); } @@ -294,7 +294,7 @@ return StructuredDataPluginSP(); } -const ConstString &EventDataStructuredData::GetFlavorString() { +ConstString EventDataStructuredData::GetFlavorString() { static ConstString s_flavor("EventDataStructuredData"); return s_flavor; } Index: lldb/trunk/source/Utility/FileSpec.cpp =================================================================== --- lldb/trunk/source/Utility/FileSpec.cpp +++ lldb/trunk/source/Utility/FileSpec.cpp @@ -401,7 +401,7 @@ //------------------------------------------------------------------ // Directory string const get accessor. //------------------------------------------------------------------ -const ConstString &FileSpec::GetDirectory() const { return m_directory; } +ConstString FileSpec::GetDirectory() const { return m_directory; } //------------------------------------------------------------------ // Filename string get accessor. @@ -411,7 +411,7 @@ //------------------------------------------------------------------ // Filename string const get accessor. //------------------------------------------------------------------ -const ConstString &FileSpec::GetFilename() const { return m_filename; } +ConstString FileSpec::GetFilename() const { return m_filename; } //------------------------------------------------------------------ // Extract the directory and path into a fixed buffer. This is needed as the Index: lldb/trunk/source/Utility/Listener.cpp =================================================================== --- lldb/trunk/source/Utility/Listener.cpp +++ lldb/trunk/source/Utility/Listener.cpp @@ -238,7 +238,7 @@ if (m_broadcaster_names) { bool found_source = false; - const ConstString &event_broadcaster_name = + ConstString event_broadcaster_name = event_sp->GetBroadcaster()->GetBroadcasterName(); for (uint32_t i = 0; i < m_num_broadcaster_names; ++i) { if (m_broadcaster_names[i] == event_broadcaster_name) { Index: lldb/trunk/unittests/Core/MangledTest.cpp =================================================================== --- lldb/trunk/unittests/Core/MangledTest.cpp +++ lldb/trunk/unittests/Core/MangledTest.cpp @@ -31,7 +31,7 @@ bool IsMangled = true; Mangled TheMangled(MangledName, IsMangled); - const ConstString &TheDemangled = + ConstString TheDemangled = TheMangled.GetDemangledName(eLanguageTypeC_plus_plus); ConstString ExpectedResult("void a::b::c(unsigned long)"); @@ -43,7 +43,7 @@ bool IsMangled = true; Mangled TheMangled(MangledName, IsMangled); - const ConstString &TheDemangled = + ConstString TheDemangled = TheMangled.GetDemangledName(eLanguageTypeC_plus_plus); EXPECT_STREQ("", TheDemangled.GetCString()); Index: lldb/trunk/www/architecture/varformats.html =================================================================== --- lldb/trunk/www/architecture/varformats.html +++ lldb/trunk/www/architecture/varformats.html @@ -118,7 +118,7 @@
  • virtual size_t - GetIndexOfChildWithName (const ConstString &name) = 0; + GetIndexOfChildWithName (ConstString name) = 0;
  • virtual bool