Pass ConstString by value (NFC)
authorAdrian Prantl <aprantl@apple.com>
Wed, 6 Mar 2019 21:22:25 +0000 (21:22 +0000)
committerAdrian Prantl <aprantl@apple.com>
Wed, 6 Mar 2019 21:22:25 +0000 (21:22 +0000)
My apologies for the large patch. With the exception of ConstString.h
itself it was entirely produced by sed.

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

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

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

llvm-svn: 355553

209 files changed:
lldb/docs/structured_data/StructuredDataPlugins.md
lldb/include/lldb/Breakpoint/Breakpoint.h
lldb/include/lldb/Breakpoint/BreakpointName.h
lldb/include/lldb/Breakpoint/BreakpointResolverName.h
lldb/include/lldb/Breakpoint/Watchpoint.h
lldb/include/lldb/Core/Debugger.h
lldb/include/lldb/Core/Disassembler.h
lldb/include/lldb/Core/Mangled.h
lldb/include/lldb/Core/Module.h
lldb/include/lldb/Core/ModuleList.h
lldb/include/lldb/Core/ModuleSpec.h
lldb/include/lldb/Core/PluginManager.h
lldb/include/lldb/Core/RichManglingContext.h
lldb/include/lldb/Core/Section.h
lldb/include/lldb/Core/UserSettingsController.h
lldb/include/lldb/Core/ValueObject.h
lldb/include/lldb/Core/ValueObjectCast.h
lldb/include/lldb/Core/ValueObjectChild.h
lldb/include/lldb/Core/ValueObjectConstResult.h
lldb/include/lldb/Core/ValueObjectConstResultCast.h
lldb/include/lldb/Core/ValueObjectConstResultChild.h
lldb/include/lldb/Core/ValueObjectRegister.h
lldb/include/lldb/Core/ValueObjectSyntheticFilter.h
lldb/include/lldb/DataFormatters/DataVisualization.h
lldb/include/lldb/DataFormatters/FormatCache.h
lldb/include/lldb/DataFormatters/FormatManager.h
lldb/include/lldb/DataFormatters/FormattersContainer.h
lldb/include/lldb/DataFormatters/TypeSynthetic.h
lldb/include/lldb/DataFormatters/VectorIterator.h
lldb/include/lldb/Expression/ExpressionVariable.h
lldb/include/lldb/Expression/IRExecutionUnit.h
lldb/include/lldb/Interpreter/OptionGroupPlatform.h
lldb/include/lldb/Interpreter/OptionValueDictionary.h
lldb/include/lldb/Interpreter/OptionValueProperties.h
lldb/include/lldb/Interpreter/Property.h
lldb/include/lldb/Symbol/ClangASTContext.h
lldb/include/lldb/Symbol/ClangASTImporter.h
lldb/include/lldb/Symbol/CompilerType.h
lldb/include/lldb/Symbol/DeclVendor.h
lldb/include/lldb/Symbol/Function.h
lldb/include/lldb/Symbol/Symbol.h
lldb/include/lldb/Symbol/SymbolContext.h
lldb/include/lldb/Symbol/SymbolFile.h
lldb/include/lldb/Symbol/SymbolVendor.h
lldb/include/lldb/Symbol/Symtab.h
lldb/include/lldb/Symbol/Type.h
lldb/include/lldb/Symbol/TypeList.h
lldb/include/lldb/Symbol/TypeMap.h
lldb/include/lldb/Symbol/TypeSystem.h
lldb/include/lldb/Symbol/Variable.h
lldb/include/lldb/Symbol/VariableList.h
lldb/include/lldb/Target/ABI.h
lldb/include/lldb/Target/MemoryRegionInfo.h
lldb/include/lldb/Target/ObjCLanguageRuntime.h
lldb/include/lldb/Target/PathMappingList.h
lldb/include/lldb/Target/Platform.h
lldb/include/lldb/Target/Process.h
lldb/include/lldb/Target/StackFrameRecognizer.h
lldb/include/lldb/Target/StructuredDataPlugin.h
lldb/include/lldb/Target/Target.h
lldb/include/lldb/Target/Thread.h
lldb/include/lldb/Utility/ArchSpec.h
lldb/include/lldb/Utility/Broadcaster.h
lldb/include/lldb/Utility/ConstString.h
lldb/include/lldb/Utility/Event.h
lldb/include/lldb/Utility/FileSpec.h
lldb/include/lldb/Utility/Log.h
lldb/source/API/SBType.cpp
lldb/source/Breakpoint/Breakpoint.cpp
lldb/source/Breakpoint/BreakpointName.cpp
lldb/source/Breakpoint/BreakpointResolverName.cpp
lldb/source/Breakpoint/Watchpoint.cpp
lldb/source/Commands/CommandObjectSource.cpp
lldb/source/Commands/CommandObjectType.cpp
lldb/source/Core/Debugger.cpp
lldb/source/Core/Disassembler.cpp
lldb/source/Core/Mangled.cpp
lldb/source/Core/Module.cpp
lldb/source/Core/ModuleList.cpp
lldb/source/Core/PluginManager.cpp
lldb/source/Core/RichManglingContext.cpp
lldb/source/Core/Section.cpp
lldb/source/Core/UserSettingsController.cpp
lldb/source/Core/ValueObject.cpp
lldb/source/Core/ValueObjectCast.cpp
lldb/source/Core/ValueObjectChild.cpp
lldb/source/Core/ValueObjectConstResult.cpp
lldb/source/Core/ValueObjectConstResultCast.cpp
lldb/source/Core/ValueObjectConstResultChild.cpp
lldb/source/Core/ValueObjectRegister.cpp
lldb/source/Core/ValueObjectSyntheticFilter.cpp
lldb/source/DataFormatters/DataVisualization.cpp
lldb/source/DataFormatters/FormatCache.cpp
lldb/source/DataFormatters/FormatManager.cpp
lldb/source/DataFormatters/TypeSynthetic.cpp
lldb/source/DataFormatters/VectorType.cpp
lldb/source/Expression/ExpressionVariable.cpp
lldb/source/Expression/IRExecutionUnit.cpp
lldb/source/Host/common/FileSystem.cpp
lldb/source/Interpreter/OptionValueDictionary.cpp
lldb/source/Interpreter/OptionValueProperties.cpp
lldb/source/Interpreter/Property.cpp
lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp
lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.h
lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h
lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h
lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h
lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp
lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.h
lldb/source/Plugins/Language/CPlusPlus/BlockPointer.cpp
lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h
lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp
lldb/source/Plugins/Language/CPlusPlus/LibCxx.h
lldb/source/Plugins/Language/CPlusPlus/LibCxxAtomic.cpp
lldb/source/Plugins/Language/CPlusPlus/LibCxxBitset.cpp
lldb/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp
lldb/source/Plugins/Language/CPlusPlus/LibCxxList.cpp
lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp
lldb/source/Plugins/Language/CPlusPlus/LibCxxOptional.cpp
lldb/source/Plugins/Language/CPlusPlus/LibCxxQueue.cpp
lldb/source/Plugins/Language/CPlusPlus/LibCxxTuple.cpp
lldb/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp
lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp
lldb/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp
lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp
lldb/source/Plugins/Language/CPlusPlus/LibStdcppTuple.cpp
lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp
lldb/source/Plugins/Language/ObjC/Cocoa.cpp
lldb/source/Plugins/Language/ObjC/NSArray.cpp
lldb/source/Plugins/Language/ObjC/NSDictionary.cpp
lldb/source/Plugins/Language/ObjC/NSError.cpp
lldb/source/Plugins/Language/ObjC/NSException.cpp
lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp
lldb/source/Plugins/Language/ObjC/NSSet.cpp
lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp
lldb/source/Plugins/Language/ObjC/ObjCLanguage.h
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.h
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.h
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h
lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp
lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.h
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h
lldb/source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.h
lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
lldb/source/Symbol/ClangASTContext.cpp
lldb/source/Symbol/CompilerType.cpp
lldb/source/Symbol/Function.cpp
lldb/source/Symbol/LocateSymbolFile.cpp
lldb/source/Symbol/Symbol.cpp
lldb/source/Symbol/SymbolContext.cpp
lldb/source/Symbol/SymbolFile.cpp
lldb/source/Symbol/SymbolVendor.cpp
lldb/source/Symbol/Symtab.cpp
lldb/source/Symbol/Type.cpp
lldb/source/Symbol/TypeList.cpp
lldb/source/Symbol/TypeMap.cpp
lldb/source/Symbol/TypeSystem.cpp
lldb/source/Symbol/Variable.cpp
lldb/source/Symbol/VariableList.cpp
lldb/source/Target/ABI.cpp
lldb/source/Target/ObjCLanguageRuntime.cpp
lldb/source/Target/PathMappingList.cpp
lldb/source/Target/Platform.cpp
lldb/source/Target/Process.cpp
lldb/source/Target/StackFrameRecognizer.cpp
lldb/source/Target/StructuredDataPlugin.cpp
lldb/source/Target/Target.cpp
lldb/source/Target/Thread.cpp
lldb/source/Utility/ArchSpec.cpp
lldb/source/Utility/ConstString.cpp
lldb/source/Utility/Event.cpp
lldb/source/Utility/FileSpec.cpp
lldb/source/Utility/Listener.cpp
lldb/unittests/Core/MangledTest.cpp
lldb/www/architecture/varformats.html

index 2a536c7871b7d49dac2dc78f088b6563543e5be6..f632e5e94f5a07fe3b0050f5bebd2870338dff57 100644 (file)
@@ -35,7 +35,7 @@ StructuredDataPlugin instances have the following characteristics:
 
   ```C++
   virtual Error
-  ConfigureStructuredData(const ConstString &type_name,
+  ConfigureStructuredData(ConstString type_name,
                           const StructuredData::ObjectSP &config_sp)
   ```
 
@@ -110,7 +110,7 @@ StructuredDataPlugin instances have the following characteristics:
 
     ```C++
     virtual Error
-    ConfigureStructuredData(const ConstString &type_name,
+    ConfigureStructuredData(ConstString type_name,
                             const StructuredData::ObjectSP &config_sp)
     ```
 
index 4b59e02b4dc47e39670a792c0f58e23253af1f4b..c7826b6cfcae5e2b4337dae1528ae777abcf3ed0 100644 (file)
@@ -82,7 +82,7 @@ namespace lldb_private {
 class Breakpoint : public std::enable_shared_from_this<Breakpoint>,
                    public Stoppoint {
 public:
-  static const ConstString &GetEventIdentifier();
+  static ConstString GetEventIdentifier();
 
   //------------------------------------------------------------------
   /// An enum specifying the match style for breakpoint settings.  At present
@@ -108,9 +108,9 @@ public:
 
     ~BreakpointEventData() override;
 
-    static const ConstString &GetFlavorString();
+    static ConstString GetFlavorString();
 
-    const ConstString &GetFlavor() const override;
+    ConstString GetFlavor() const override;
 
     lldb::BreakpointEventType GetBreakpointEventType() const;
 
@@ -575,7 +575,7 @@ public:
   ///     the
   ///     description.
   //------------------------------------------------------------------
-  bool GetMatchingFileLine(const ConstString &filename, uint32_t line_number,
+  bool GetMatchingFileLine(ConstString filename, uint32_t line_number,
                            BreakpointLocationCollection &loc_coll);
 
   void GetFilterDescription(Stream *s);
index 14b68dab830a98d509c43f181c520daf30b71b10..61020a6280707cc7f3a6c16be6894bec236f7eea 100644 (file)
@@ -136,13 +136,13 @@ public:
     }
   };
   
-  BreakpointName(const ConstString &name, const char *help = nullptr) :
+  BreakpointName(ConstString name, const char *help = nullptr) :
       m_name(name), m_options(false)
    {
      SetHelp(help);
    }
       
-  BreakpointName(const ConstString &name,
+  BreakpointName(ConstString name,
                  BreakpointOptions &options,
                  const Permissions &permissions = Permissions(),
                  const char *help = nullptr) :
@@ -156,10 +156,10 @@ public:
       m_permissions(rhs.m_permissions), m_help(rhs.m_help)
   {}
   
-  BreakpointName(const ConstString &name, const Breakpoint &bkpt,
+  BreakpointName(ConstString name, const Breakpoint &bkpt,
                  const char *help);
       
-  const ConstString &GetName() const { return m_name; }
+  ConstString GetName() const { return m_name; }
   BreakpointOptions &GetOptions() { return m_options; }
   const BreakpointOptions &GetOptions() const { return m_options; }
   
index 9c4d2cf0a6f5797d3bfb1a2f90f67605457a8f47..c7b4740e317e99f41377fceb5ba1aa7d8aab64a9 100644 (file)
@@ -87,7 +87,7 @@ protected:
   lldb::LanguageType m_language;
   bool m_skip_prologue;
 
-  void AddNameLookup(const ConstString &name,
+  void AddNameLookup(ConstString name,
                      lldb::FunctionNameType name_type_mask);
 };
 
index 4e72cdc3a46836c919e922a3660d49151f3800cf..079810194e65b0e70772fc07c0c8021eb3c027ca 100644 (file)
@@ -31,9 +31,9 @@ public:
 
     ~WatchpointEventData() override;
 
-    static const ConstString &GetFlavorString();
+    static ConstString GetFlavorString();
 
-    const ConstString &GetFlavor() const override;
+    ConstString GetFlavor() const override;
 
     lldb::WatchpointEventType GetWatchpointEventType() const;
 
index c39779c1af46d77632931abc2ae9d97109c39f21..13cbf69914bd8cd738c193b47e63c2278f97c8ef 100644 (file)
@@ -110,7 +110,7 @@ public:
   static lldb::DebuggerSP FindDebuggerWithID(lldb::user_id_t id);
 
   static lldb::DebuggerSP
-  FindDebuggerWithInstanceName(const ConstString &instance_name);
+  FindDebuggerWithInstanceName(ConstString instance_name);
 
   static size_t GetNumDebuggers();
 
@@ -310,7 +310,7 @@ public:
 
   bool GetNotifyVoid() const;
 
-  const ConstString &GetInstanceName() { return m_instance_name; }
+  ConstString GetInstanceName() { return m_instance_name; }
 
   bool LoadPlugin(const FileSpec &spec, Status &error);
 
index 5a1ef92c2557c3d2637cbc9c50086edf9de94f7a..9d025f4d8fa5ed8cea03bcc2a525871abda17f3b 100644 (file)
@@ -413,7 +413,7 @@ public:
   static bool
   Disassemble(Debugger &debugger, const ArchSpec &arch, const char *plugin_name,
               const char *flavor, const ExecutionContext &exe_ctx,
-              const ConstString &name, Module *module,
+              ConstString name, Module *module,
               uint32_t num_instructions, bool mixed_source_and_assembly,
               uint32_t num_mixed_context_lines, uint32_t options, Stream &strm);
 
index 917184efcd6cc4bb9421a150474037839c0dc7ee..512001944bc8ec651f9594f20121e765015f249f 100644 (file)
@@ -68,7 +68,7 @@ public:
   ///     If \b true then \a name is a mangled name, if \b false then
   ///     \a name is demangled.
   //----------------------------------------------------------------------
-  Mangled(const ConstString &name, bool is_mangled);
+  Mangled(ConstString name, bool is_mangled);
   Mangled(llvm::StringRef name, bool is_mangled);
 
   //----------------------------------------------------------------------
@@ -80,7 +80,7 @@ public:
   /// @param[in] name
   ///     The already const name to copy into this object.
   //----------------------------------------------------------------------
-  explicit Mangled(const ConstString &name);
+  explicit Mangled(ConstString name);
 
   explicit Mangled(llvm::StringRef name);
 
@@ -176,7 +176,7 @@ public:
   /// @return
   ///     A const reference to the demangled name string object.
   //----------------------------------------------------------------------
-  const ConstString &GetDemangledName(lldb::LanguageType language) const;
+  ConstString GetDemangledName(lldb::LanguageType language) const;
 
   //----------------------------------------------------------------------
   /// Display demangled name get accessor.
@@ -186,9 +186,9 @@ public:
   //----------------------------------------------------------------------
   ConstString GetDisplayDemangledName(lldb::LanguageType language) const;
 
-  void SetDemangledName(const ConstString &name) { m_demangled = name; }
+  void SetDemangledName(ConstString name) { m_demangled = name; }
 
-  void SetMangledName(const ConstString &name) { m_mangled = name; }
+  void SetMangledName(ConstString name) { m_mangled = name; }
 
   //----------------------------------------------------------------------
   /// Mangled name get accessor.
@@ -204,7 +204,7 @@ public:
   /// @return
   ///     A const reference to the mangled name string object.
   //----------------------------------------------------------------------
-  const ConstString &GetMangledName() const { return m_mangled; }
+  ConstString GetMangledName() const { return m_mangled; }
 
   //----------------------------------------------------------------------
   /// Best name get accessor.
@@ -229,7 +229,7 @@ public:
   /// @return
   ///     \b True if \a name matches either name, \b false otherwise.
   //----------------------------------------------------------------------
-  bool NameMatches(const ConstString &name, lldb::LanguageType language) const {
+  bool NameMatches(ConstString name, lldb::LanguageType language) const {
     if (m_mangled == name)
       return true;
     return GetDemangledName(language) == name;
@@ -264,7 +264,7 @@ public:
   ///     If \b true then \a name is a mangled name, if \b false then
   ///     \a name is demangled.
   //----------------------------------------------------------------------
-  void SetValue(const ConstString &name, bool is_mangled);
+  void SetValue(ConstString name, bool is_mangled);
 
   //----------------------------------------------------------------------
   /// Set the string value in this object.
@@ -275,7 +275,7 @@ public:
   /// @param[in] name
   ///     The already const version of the name for this object.
   //----------------------------------------------------------------------
-  void SetValue(const ConstString &name);
+  void SetValue(ConstString name);
 
   //----------------------------------------------------------------------
   /// Try to guess the language from the mangling.
index f34c2376cda8b6ef0cc426550f64cc840a4c5012..ea534995f39eae6b4f3adf54153dddb8c8fd06fa 100644 (file)
@@ -293,10 +293,10 @@ public:
   ///     nullptr otherwise.
   //------------------------------------------------------------------
   const Symbol *FindFirstSymbolWithNameAndType(
-      const ConstString &name,
+      ConstString name,
       lldb::SymbolType symbol_type = lldb::eSymbolTypeAny);
 
-  size_t FindSymbolsWithNameAndType(const ConstString &name,
+  size_t FindSymbolsWithNameAndType(ConstString name,
                                     lldb::SymbolType symbol_type,
                                     SymbolContextList &sc_list);
 
@@ -321,7 +321,7 @@ public:
   /// @return
   ///     The number of symbol contexts that were added to \a sc_list
   //------------------------------------------------------------------
-  size_t FindFunctionSymbols(const ConstString &name, uint32_t name_type_mask,
+  size_t FindFunctionSymbols(ConstString name, uint32_t name_type_mask,
                              SymbolContextList &sc_list);
 
   //------------------------------------------------------------------
@@ -378,7 +378,7 @@ public:
   /// @return
   ///     The number of matches added to \a sc_list.
   //------------------------------------------------------------------
-  size_t FindFunctions(const ConstString &name,
+  size_t FindFunctions(ConstString name,
                        const CompilerDeclContext *parent_decl_ctx,
                        lldb::FunctionNameType name_type_mask, bool symbols_ok,
                        bool inlines_ok, bool append,
@@ -457,7 +457,7 @@ public:
   /// @return
   ///     The number of matches added to \a variable_list.
   //------------------------------------------------------------------
-  size_t FindGlobalVariables(const ConstString &name,
+  size_t FindGlobalVariables(ConstString name,
                              const CompilerDeclContext *parent_decl_ctx,
                              size_t max_matches, VariableList &variable_list);
 
@@ -516,12 +516,12 @@ public:
   ///     The number of matches added to \a type_list.
   //------------------------------------------------------------------
   size_t
-  FindTypes(const ConstString &type_name, bool exact_match, size_t max_matches,
+  FindTypes(ConstString type_name, bool exact_match, size_t max_matches,
             llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
             TypeList &types);
 
   lldb::TypeSP FindFirstType(const SymbolContext &sc,
-                             const ConstString &type_name, bool exact_match);
+                             ConstString type_name, bool exact_match);
 
   //------------------------------------------------------------------
   /// Find types by name that are in a namespace. This function is used by the
@@ -541,7 +541,7 @@ public:
   /// @return
   ///     The number of matches added to \a type_list.
   //------------------------------------------------------------------
-  size_t FindTypesInNamespace(const ConstString &type_name,
+  size_t FindTypesInNamespace(ConstString type_name,
                               const CompilerDeclContext *parent_decl_ctx,
                               size_t max_matches, TypeList &type_list);
 
@@ -649,7 +649,7 @@ public:
 
   lldb::CompUnitSP GetCompileUnitAtIndex(size_t idx);
 
-  const ConstString &GetObjectName() const;
+  ConstString GetObjectName() const;
 
   uint64_t GetObjectOffset() const { return m_object_offset; }
 
@@ -917,7 +917,7 @@ public:
       lldb::SymbolContextItem resolve_scope, SymbolContextList &sc_list);
 
   void SetFileSpecAndObjectName(const FileSpec &file,
-                                const ConstString &object_name);
+                                ConstString object_name);
 
   bool GetIsDynamicLinkEditor();
 
@@ -1036,16 +1036,16 @@ public:
           m_name_type_mask(lldb::eFunctionNameTypeNone),
           m_match_name_after_lookup(false) {}
 
-    LookupInfo(const ConstString &name, lldb::FunctionNameType name_type_mask,
+    LookupInfo(ConstString name, lldb::FunctionNameType name_type_mask,
                lldb::LanguageType language);
 
-    const ConstString &GetName() const { return m_name; }
+    ConstString GetName() const { return m_name; }
 
-    void SetName(const ConstString &name) { m_name = name; }
+    void SetName(ConstString name) { m_name = name; }
 
-    const ConstString &GetLookupName() const { return m_lookup_name; }
+    ConstString GetLookupName() const { return m_lookup_name; }
 
-    void SetLookupName(const ConstString &name) { m_lookup_name = name; }
+    void SetLookupName(ConstString name) { m_lookup_name = name; }
 
     lldb::FunctionNameType GetNameTypeMask() const { return m_name_type_mask; }
 
@@ -1188,7 +1188,7 @@ private:
   Module(); // Only used internally by CreateJITModule ()
 
   size_t FindTypes_Impl(
-      const ConstString &name, const CompilerDeclContext *parent_decl_ctx,
+      ConstString name, const CompilerDeclContext *parent_decl_ctx,
       bool append, size_t max_matches,
       llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
       TypeMap &types);
index 0fbe46e7b47456be2ef64b26cbd7f2fa1a8428bc..a341d1de540ffa74d499de78d2b7b102706c8d75 100644 (file)
@@ -299,7 +299,7 @@ public:
   //------------------------------------------------------------------
   /// @see Module::FindFunctions ()
   //------------------------------------------------------------------
-  size_t FindFunctions(const ConstString &name,
+  size_t FindFunctions(ConstString name,
                        lldb::FunctionNameType name_type_mask,
                        bool include_symbols, bool include_inlines, bool append,
                        SymbolContextList &sc_list) const;
@@ -307,7 +307,7 @@ public:
   //------------------------------------------------------------------
   /// @see Module::FindFunctionSymbols ()
   //------------------------------------------------------------------
-  size_t FindFunctionSymbols(const ConstString &name,
+  size_t FindFunctionSymbols(ConstString name,
                              lldb::FunctionNameType name_type_mask,
                              SymbolContextList &sc_list);
 
@@ -335,7 +335,7 @@ public:
   /// @return
   ///     The number of matches added to \a variable_list.
   //------------------------------------------------------------------
-  size_t FindGlobalVariables(const ConstString &name, size_t max_matches,
+  size_t FindGlobalVariables(ConstString name, size_t max_matches,
                              VariableList &variable_list) const;
 
   //------------------------------------------------------------------
@@ -403,7 +403,7 @@ public:
 
   lldb::ModuleSP FindFirstModule(const ModuleSpec &module_spec) const;
 
-  size_t FindSymbolsWithNameAndType(const ConstString &name,
+  size_t FindSymbolsWithNameAndType(ConstString name,
                                     lldb::SymbolType symbol_type,
                                     SymbolContextList &sc_list,
                                     bool append = false) const;
@@ -446,7 +446,7 @@ public:
   /// @return
   ///     The number of matches added to \a type_list.
   //------------------------------------------------------------------
-  size_t FindTypes(Module *search_first, const ConstString &name,
+  size_t FindTypes(Module *search_first, ConstString name,
                    bool name_is_fully_qualified, size_t max_matches,
                    llvm::DenseSet<SymbolFile *> &searched_symbol_files,
                    TypeList &types) const;
index d8f042f579f777e4e48ec22653e4df703858adb2..16a8cfa32b604d30f7622bdc723831dc1ec66ae4 100644 (file)
@@ -124,7 +124,7 @@ public:
 
   ConstString &GetObjectName() { return m_object_name; }
 
-  const ConstString &GetObjectName() const { return m_object_name; }
+  ConstString GetObjectName() const { return m_object_name; }
 
   uint64_t GetObjectOffset() const { return m_object_offset; }
 
index 5a936f6e865637a353f00c685c16e8144fa9d415..cc80b978c7216e83b195e4f16d861daf0c818dbd 100644 (file)
@@ -43,7 +43,7 @@ public:
   //------------------------------------------------------------------
   // ABI
   //------------------------------------------------------------------
-  static bool RegisterPlugin(const ConstString &name, const char *description,
+  static bool RegisterPlugin(ConstString name, const char *description,
                              ABICreateInstance create_callback);
 
   static bool UnregisterPlugin(ABICreateInstance create_callback);
@@ -51,7 +51,7 @@ public:
   static ABICreateInstance GetABICreateCallbackAtIndex(uint32_t idx);
 
   static ABICreateInstance
-  GetABICreateCallbackForPluginName(const ConstString &name);
+  GetABICreateCallbackForPluginName(ConstString name);
 
   //------------------------------------------------------------------
   // Architecture
@@ -59,7 +59,7 @@ public:
   using ArchitectureCreateInstance =
       std::unique_ptr<Architecture> (*)(const ArchSpec &);
 
-  static void RegisterPlugin(const ConstString &name,
+  static void RegisterPlugin(ConstString name,
                              llvm::StringRef description,
                              ArchitectureCreateInstance create_callback);
 
@@ -71,7 +71,7 @@ public:
   //------------------------------------------------------------------
   // Disassembler
   //------------------------------------------------------------------
-  static bool RegisterPlugin(const ConstString &name, const char *description,
+  static bool RegisterPlugin(ConstString name, const char *description,
                              DisassemblerCreateInstance create_callback);
 
   static bool UnregisterPlugin(DisassemblerCreateInstance create_callback);
@@ -80,13 +80,13 @@ public:
   GetDisassemblerCreateCallbackAtIndex(uint32_t idx);
 
   static DisassemblerCreateInstance
-  GetDisassemblerCreateCallbackForPluginName(const ConstString &name);
+  GetDisassemblerCreateCallbackForPluginName(ConstString name);
 
   //------------------------------------------------------------------
   // DynamicLoader
   //------------------------------------------------------------------
   static bool
-  RegisterPlugin(const ConstString &name, const char *description,
+  RegisterPlugin(ConstString name, const char *description,
                  DynamicLoaderCreateInstance create_callback,
                  DebuggerInitializeCallback debugger_init_callback = nullptr);
 
@@ -96,13 +96,13 @@ public:
   GetDynamicLoaderCreateCallbackAtIndex(uint32_t idx);
 
   static DynamicLoaderCreateInstance
-  GetDynamicLoaderCreateCallbackForPluginName(const ConstString &name);
+  GetDynamicLoaderCreateCallbackForPluginName(ConstString name);
 
   //------------------------------------------------------------------
   // JITLoader
   //------------------------------------------------------------------
   static bool
-  RegisterPlugin(const ConstString &name, const char *description,
+  RegisterPlugin(ConstString name, const char *description,
                  JITLoaderCreateInstance create_callback,
                  DebuggerInitializeCallback debugger_init_callback = nullptr);
 
@@ -112,12 +112,12 @@ public:
   GetJITLoaderCreateCallbackAtIndex(uint32_t idx);
 
   static JITLoaderCreateInstance
-  GetJITLoaderCreateCallbackForPluginName(const ConstString &name);
+  GetJITLoaderCreateCallbackForPluginName(ConstString name);
 
   //------------------------------------------------------------------
   // EmulateInstruction
   //------------------------------------------------------------------
-  static bool RegisterPlugin(const ConstString &name, const char *description,
+  static bool RegisterPlugin(ConstString name, const char *description,
                              EmulateInstructionCreateInstance create_callback);
 
   static bool
@@ -127,12 +127,12 @@ public:
   GetEmulateInstructionCreateCallbackAtIndex(uint32_t idx);
 
   static EmulateInstructionCreateInstance
-  GetEmulateInstructionCreateCallbackForPluginName(const ConstString &name);
+  GetEmulateInstructionCreateCallbackForPluginName(ConstString name);
 
   //------------------------------------------------------------------
   // OperatingSystem
   //------------------------------------------------------------------
-  static bool RegisterPlugin(const ConstString &name, const char *description,
+  static bool RegisterPlugin(ConstString name, const char *description,
                              OperatingSystemCreateInstance create_callback,
                              DebuggerInitializeCallback debugger_init_callback);
 
@@ -142,12 +142,12 @@ public:
   GetOperatingSystemCreateCallbackAtIndex(uint32_t idx);
 
   static OperatingSystemCreateInstance
-  GetOperatingSystemCreateCallbackForPluginName(const ConstString &name);
+  GetOperatingSystemCreateCallbackForPluginName(ConstString name);
 
   //------------------------------------------------------------------
   // Language
   //------------------------------------------------------------------
-  static bool RegisterPlugin(const ConstString &name, const char *description,
+  static bool RegisterPlugin(ConstString name, const char *description,
                              LanguageCreateInstance create_callback);
 
   static bool UnregisterPlugin(LanguageCreateInstance create_callback);
@@ -155,13 +155,13 @@ public:
   static LanguageCreateInstance GetLanguageCreateCallbackAtIndex(uint32_t idx);
 
   static LanguageCreateInstance
-  GetLanguageCreateCallbackForPluginName(const ConstString &name);
+  GetLanguageCreateCallbackForPluginName(ConstString name);
 
   //------------------------------------------------------------------
   // LanguageRuntime
   //------------------------------------------------------------------
   static bool
-  RegisterPlugin(const ConstString &name, const char *description,
+  RegisterPlugin(ConstString name, const char *description,
                  LanguageRuntimeCreateInstance create_callback,
                  LanguageRuntimeGetCommandObject command_callback = nullptr);
 
@@ -174,12 +174,12 @@ public:
   GetLanguageRuntimeGetCommandObjectAtIndex(uint32_t idx);
 
   static LanguageRuntimeCreateInstance
-  GetLanguageRuntimeCreateCallbackForPluginName(const ConstString &name);
+  GetLanguageRuntimeCreateCallbackForPluginName(ConstString name);
 
   //------------------------------------------------------------------
   // SystemRuntime
   //------------------------------------------------------------------
-  static bool RegisterPlugin(const ConstString &name, const char *description,
+  static bool RegisterPlugin(ConstString name, const char *description,
                              SystemRuntimeCreateInstance create_callback);
 
   static bool UnregisterPlugin(SystemRuntimeCreateInstance create_callback);
@@ -188,13 +188,13 @@ public:
   GetSystemRuntimeCreateCallbackAtIndex(uint32_t idx);
 
   static SystemRuntimeCreateInstance
-  GetSystemRuntimeCreateCallbackForPluginName(const ConstString &name);
+  GetSystemRuntimeCreateCallbackForPluginName(ConstString name);
 
   //------------------------------------------------------------------
   // ObjectFile
   //------------------------------------------------------------------
   static bool
-  RegisterPlugin(const ConstString &name, const char *description,
+  RegisterPlugin(ConstString name, const char *description,
                  ObjectFileCreateInstance create_callback,
                  ObjectFileCreateMemoryInstance create_memory_callback,
                  ObjectFileGetModuleSpecifications get_module_specifications,
@@ -212,10 +212,10 @@ public:
   GetObjectFileGetModuleSpecificationsCallbackAtIndex(uint32_t idx);
 
   static ObjectFileCreateInstance
-  GetObjectFileCreateCallbackForPluginName(const ConstString &name);
+  GetObjectFileCreateCallbackForPluginName(ConstString name);
 
   static ObjectFileCreateMemoryInstance
-  GetObjectFileCreateMemoryCallbackForPluginName(const ConstString &name);
+  GetObjectFileCreateMemoryCallbackForPluginName(ConstString name);
 
   static Status SaveCore(const lldb::ProcessSP &process_sp,
                          const FileSpec &outfile);
@@ -224,7 +224,7 @@ public:
   // ObjectContainer
   //------------------------------------------------------------------
   static bool
-  RegisterPlugin(const ConstString &name, const char *description,
+  RegisterPlugin(ConstString name, const char *description,
                  ObjectContainerCreateInstance create_callback,
                  ObjectFileGetModuleSpecifications get_module_specifications);
 
@@ -234,7 +234,7 @@ public:
   GetObjectContainerCreateCallbackAtIndex(uint32_t idx);
 
   static ObjectContainerCreateInstance
-  GetObjectContainerCreateCallbackForPluginName(const ConstString &name);
+  GetObjectContainerCreateCallbackForPluginName(ConstString name);
 
   static ObjectFileGetModuleSpecifications
   GetObjectContainerGetModuleSpecificationsCallbackAtIndex(uint32_t idx);
@@ -243,7 +243,7 @@ public:
   // Platform
   //------------------------------------------------------------------
   static bool
-  RegisterPlugin(const ConstString &name, const char *description,
+  RegisterPlugin(ConstString name, const char *description,
                  PlatformCreateInstance create_callback,
                  DebuggerInitializeCallback debugger_init_callback = nullptr);
 
@@ -252,7 +252,7 @@ public:
   static PlatformCreateInstance GetPlatformCreateCallbackAtIndex(uint32_t idx);
 
   static PlatformCreateInstance
-  GetPlatformCreateCallbackForPluginName(const ConstString &name);
+  GetPlatformCreateCallbackForPluginName(ConstString name);
 
   static const char *GetPlatformPluginNameAtIndex(uint32_t idx);
 
@@ -264,7 +264,7 @@ public:
   // Process
   //------------------------------------------------------------------
   static bool
-  RegisterPlugin(const ConstString &name, const char *description,
+  RegisterPlugin(ConstString name, const char *description,
                  ProcessCreateInstance create_callback,
                  DebuggerInitializeCallback debugger_init_callback = nullptr);
 
@@ -273,7 +273,7 @@ public:
   static ProcessCreateInstance GetProcessCreateCallbackAtIndex(uint32_t idx);
 
   static ProcessCreateInstance
-  GetProcessCreateCallbackForPluginName(const ConstString &name);
+  GetProcessCreateCallbackForPluginName(ConstString name);
 
   static const char *GetProcessPluginNameAtIndex(uint32_t idx);
 
@@ -282,7 +282,7 @@ public:
   //------------------------------------------------------------------
   // ScriptInterpreter
   //------------------------------------------------------------------
-  static bool RegisterPlugin(const ConstString &name, const char *description,
+  static bool RegisterPlugin(ConstString name, const char *description,
                              lldb::ScriptLanguage script_lang,
                              ScriptInterpreterCreateInstance create_callback);
 
@@ -334,7 +334,7 @@ public:
   ///    Returns true upon success; otherwise, false.
   //------------------------------------------------------------------
   static bool
-  RegisterPlugin(const ConstString &name, const char *description,
+  RegisterPlugin(ConstString name, const char *description,
                  StructuredDataPluginCreateInstance create_callback,
                  DebuggerInitializeCallback debugger_init_callback = nullptr,
                  StructuredDataFilterLaunchInfo filter_callback = nullptr);
@@ -346,7 +346,7 @@ public:
   GetStructuredDataPluginCreateCallbackAtIndex(uint32_t idx);
 
   static StructuredDataPluginCreateInstance
-  GetStructuredDataPluginCreateCallbackForPluginName(const ConstString &name);
+  GetStructuredDataPluginCreateCallbackForPluginName(ConstString name);
 
   static StructuredDataFilterLaunchInfo
   GetStructuredDataFilterCallbackAtIndex(uint32_t idx,
@@ -356,7 +356,7 @@ public:
   // SymbolFile
   //------------------------------------------------------------------
   static bool
-  RegisterPlugin(const ConstString &name, const char *description,
+  RegisterPlugin(ConstString name, const char *description,
                  SymbolFileCreateInstance create_callback,
                  DebuggerInitializeCallback debugger_init_callback = nullptr);
 
@@ -366,12 +366,12 @@ public:
   GetSymbolFileCreateCallbackAtIndex(uint32_t idx);
 
   static SymbolFileCreateInstance
-  GetSymbolFileCreateCallbackForPluginName(const ConstString &name);
+  GetSymbolFileCreateCallbackForPluginName(ConstString name);
 
   //------------------------------------------------------------------
   // SymbolVendor
   //------------------------------------------------------------------
-  static bool RegisterPlugin(const ConstString &name, const char *description,
+  static bool RegisterPlugin(ConstString name, const char *description,
                              SymbolVendorCreateInstance create_callback);
 
   static bool UnregisterPlugin(SymbolVendorCreateInstance create_callback);
@@ -380,12 +380,12 @@ public:
   GetSymbolVendorCreateCallbackAtIndex(uint32_t idx);
 
   static SymbolVendorCreateInstance
-  GetSymbolVendorCreateCallbackForPluginName(const ConstString &name);
+  GetSymbolVendorCreateCallbackForPluginName(ConstString name);
 
   //------------------------------------------------------------------
   // UnwindAssembly
   //------------------------------------------------------------------
-  static bool RegisterPlugin(const ConstString &name, const char *description,
+  static bool RegisterPlugin(ConstString name, const char *description,
                              UnwindAssemblyCreateInstance create_callback);
 
   static bool UnregisterPlugin(UnwindAssemblyCreateInstance create_callback);
@@ -394,12 +394,12 @@ public:
   GetUnwindAssemblyCreateCallbackAtIndex(uint32_t idx);
 
   static UnwindAssemblyCreateInstance
-  GetUnwindAssemblyCreateCallbackForPluginName(const ConstString &name);
+  GetUnwindAssemblyCreateCallbackForPluginName(ConstString name);
 
   //------------------------------------------------------------------
   // MemoryHistory
   //------------------------------------------------------------------
-  static bool RegisterPlugin(const ConstString &name, const char *description,
+  static bool RegisterPlugin(ConstString name, const char *description,
                              MemoryHistoryCreateInstance create_callback);
 
   static bool UnregisterPlugin(MemoryHistoryCreateInstance create_callback);
@@ -408,13 +408,13 @@ public:
   GetMemoryHistoryCreateCallbackAtIndex(uint32_t idx);
 
   static MemoryHistoryCreateInstance
-  GetMemoryHistoryCreateCallbackForPluginName(const ConstString &name);
+  GetMemoryHistoryCreateCallbackForPluginName(ConstString name);
 
   //------------------------------------------------------------------
   // InstrumentationRuntime
   //------------------------------------------------------------------
   static bool
-  RegisterPlugin(const ConstString &name, const char *description,
+  RegisterPlugin(ConstString name, const char *description,
                  InstrumentationRuntimeCreateInstance create_callback,
                  InstrumentationRuntimeGetType get_type_callback);
 
@@ -428,13 +428,13 @@ public:
   GetInstrumentationRuntimeCreateCallbackAtIndex(uint32_t idx);
 
   static InstrumentationRuntimeCreateInstance
-  GetInstrumentationRuntimeCreateCallbackForPluginName(const ConstString &name);
+  GetInstrumentationRuntimeCreateCallbackForPluginName(ConstString name);
 
   //------------------------------------------------------------------
   // TypeSystem
   //------------------------------------------------------------------
   static bool RegisterPlugin(
-      const ConstString &name, const char *description,
+      ConstString name, const char *description,
       TypeSystemCreateInstance create_callback,
       TypeSystemEnumerateSupportedLanguages enumerate_languages_callback);
 
@@ -444,20 +444,20 @@ public:
   GetTypeSystemCreateCallbackAtIndex(uint32_t idx);
 
   static TypeSystemCreateInstance
-  GetTypeSystemCreateCallbackForPluginName(const ConstString &name);
+  GetTypeSystemCreateCallbackForPluginName(ConstString name);
 
   static TypeSystemEnumerateSupportedLanguages
   GetTypeSystemEnumerateSupportedLanguagesCallbackAtIndex(uint32_t idx);
 
   static TypeSystemEnumerateSupportedLanguages
   GetTypeSystemEnumerateSupportedLanguagesCallbackForPluginName(
-      const ConstString &name);
+      ConstString name);
 
   //------------------------------------------------------------------
   // REPL
   //------------------------------------------------------------------
   static bool
-  RegisterPlugin(const ConstString &name, const char *description,
+  RegisterPlugin(ConstString name, const char *description,
                  REPLCreateInstance create_callback,
                  REPLEnumerateSupportedLanguages enumerate_languages_callback);
 
@@ -466,14 +466,14 @@ public:
   static REPLCreateInstance GetREPLCreateCallbackAtIndex(uint32_t idx);
 
   static REPLCreateInstance
-  GetREPLCreateCallbackForPluginName(const ConstString &name);
+  GetREPLCreateCallbackForPluginName(ConstString name);
 
   static REPLEnumerateSupportedLanguages
   GetREPLEnumerateSupportedLanguagesCallbackAtIndex(uint32_t idx);
 
   static REPLEnumerateSupportedLanguages
   GetREPLSystemEnumerateSupportedLanguagesCallbackForPluginName(
-      const ConstString &name);
+      ConstString name);
 
   //------------------------------------------------------------------
   // Some plug-ins might register a DebuggerInitializeCallback callback when
@@ -486,59 +486,59 @@ public:
 
   static lldb::OptionValuePropertiesSP
   GetSettingForDynamicLoaderPlugin(Debugger &debugger,
-                                   const ConstString &setting_name);
+                                   ConstString setting_name);
 
   static bool CreateSettingForDynamicLoaderPlugin(
       Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
-      const ConstString &description, bool is_global_property);
+      ConstString description, bool is_global_property);
 
   static lldb::OptionValuePropertiesSP
   GetSettingForPlatformPlugin(Debugger &debugger,
-                              const ConstString &setting_name);
+                              ConstString setting_name);
 
   static bool CreateSettingForPlatformPlugin(
       Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
-      const ConstString &description, bool is_global_property);
+      ConstString description, bool is_global_property);
 
   static lldb::OptionValuePropertiesSP
   GetSettingForProcessPlugin(Debugger &debugger,
-                             const ConstString &setting_name);
+                             ConstString setting_name);
 
   static bool CreateSettingForProcessPlugin(
       Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
-      const ConstString &description, bool is_global_property);
+      ConstString description, bool is_global_property);
 
   static lldb::OptionValuePropertiesSP
   GetSettingForSymbolFilePlugin(Debugger &debugger,
-                                const ConstString &setting_name);
+                                ConstString setting_name);
 
   static bool CreateSettingForSymbolFilePlugin(
       Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
-      const ConstString &description, bool is_global_property);
+      ConstString description, bool is_global_property);
 
   static lldb::OptionValuePropertiesSP
   GetSettingForJITLoaderPlugin(Debugger &debugger,
-                               const ConstString &setting_name);
+                               ConstString setting_name);
 
   static bool CreateSettingForJITLoaderPlugin(
       Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
-      const ConstString &description, bool is_global_property);
+      ConstString description, bool is_global_property);
 
   static lldb::OptionValuePropertiesSP
   GetSettingForOperatingSystemPlugin(Debugger &debugger,
-                                     const ConstString &setting_name);
+                                     ConstString setting_name);
 
   static bool CreateSettingForOperatingSystemPlugin(
       Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
-      const ConstString &description, bool is_global_property);
+      ConstString description, bool is_global_property);
 
   static lldb::OptionValuePropertiesSP
   GetSettingForStructuredDataPlugin(Debugger &debugger,
-                                    const ConstString &setting_name);
+                                    ConstString setting_name);
 
   static bool CreateSettingForStructuredDataPlugin(
       Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
-      const ConstString &description, bool is_global_property);
+      ConstString description, bool is_global_property);
 };
 
 } // namespace lldb_private
index 4f11080642f025b6b2a15c463a005cde471cf2dc..e6fa2599e55a2468f4816773d6f6f53c9ddc0a71 100644 (file)
@@ -33,11 +33,11 @@ public:
 
   /// Use the ItaniumPartialDemangler to obtain rich mangling information from
   /// the given mangled name.
-  bool FromItaniumName(const ConstString &mangled);
+  bool FromItaniumName(ConstString mangled);
 
   /// Use the legacy language parser implementation to obtain rich mangling
   /// information from the given demangled name.
-  bool FromCxxMethodName(const ConstString &demangled);
+  bool FromCxxMethodName(ConstString demangled);
 
   /// If this symbol describes a constructor or destructor.
   bool IsCtorOrDtor() const;
index 1011eac1dcba2185f40fa7ffd1d0b02c3260925d..8d3a0bc2689248d4eb847aa9bc443475111ead28 100644 (file)
@@ -67,7 +67,7 @@ public:
 
   void Dump(Stream *s, Target *target, bool show_header, uint32_t depth) const;
 
-  lldb::SectionSP FindSectionByName(const ConstString &section_dstr) const;
+  lldb::SectionSP FindSectionByName(ConstString section_dstr) const;
 
   lldb::SectionSP FindSectionByID(lldb::user_id_t sect_id) const;
 
@@ -109,7 +109,7 @@ class Section : public std::enable_shared_from_this<Section>,
 public:
   // Create a root section (one that has no parent)
   Section(const lldb::ModuleSP &module_sp, ObjectFile *obj_file,
-          lldb::user_id_t sect_id, const ConstString &name,
+          lldb::user_id_t sect_id, ConstString name,
           lldb::SectionType sect_type, lldb::addr_t file_vm_addr,
           lldb::addr_t vm_size, lldb::offset_t file_offset,
           lldb::offset_t file_size, uint32_t log2align, uint32_t flags,
@@ -120,7 +120,7 @@ public:
                                                     // sections, non-NULL for
                                                     // child sections
           const lldb::ModuleSP &module_sp, ObjectFile *obj_file,
-          lldb::user_id_t sect_id, const ConstString &name,
+          lldb::user_id_t sect_id, ConstString name,
           lldb::SectionType sect_type, lldb::addr_t file_vm_addr,
           lldb::addr_t vm_size, lldb::offset_t file_offset,
           lldb::offset_t file_size, uint32_t log2align, uint32_t flags,
@@ -175,7 +175,7 @@ public:
 
   bool IsDescendant(const Section *section);
 
-  const ConstString &GetName() const { return m_name; }
+  ConstString GetName() const { return m_name; }
 
   bool Slide(lldb::addr_t slide_amount, bool slide_children);
 
index a0b2197bebe633d1a5676092a771c648554306b4..31ee9cc480dd53426d64f66202f1455f7318468f 100644 (file)
@@ -77,7 +77,7 @@ public:
                  std::vector<const Property *> &matching_properties) const;
 
   lldb::OptionValuePropertiesSP GetSubProperty(const ExecutionContext *exe_ctx,
-                                               const ConstString &name);
+                                               ConstString name);
 
   // We sometimes need to introduce a setting to enable experimental features,
   // but then we don't want the setting for these to cause errors when the
index afe8494aa0e126189c2c01e3ea2118f335738932..f129f56991d47aa8903add003b41b3c5ce1ec900 100644 (file)
@@ -483,7 +483,7 @@ public:
   //------------------------------------------------------------------
   const Status &GetError();
 
-  const ConstString &GetName() const;
+  ConstString GetName() const;
 
   virtual lldb::ValueObjectSP GetChildAtIndex(size_t idx, bool can_create);
 
@@ -503,10 +503,10 @@ public:
   GetChildAtNamePath(llvm::ArrayRef<std::pair<ConstString, bool>> names,
                      ConstString *name_of_error = nullptr);
 
-  virtual lldb::ValueObjectSP GetChildMemberWithName(const ConstString &name,
+  virtual lldb::ValueObjectSP GetChildMemberWithName(ConstString name,
                                                      bool can_create);
 
-  virtual size_t GetIndexOfChildWithName(const ConstString &name);
+  virtual size_t GetIndexOfChildWithName(ConstString name);
 
   size_t GetNumChildren(uint32_t max = UINT32_MAX);
 
@@ -573,14 +573,14 @@ public:
   // Change the name of the current ValueObject. Should *not* be used from a
   // synthetic child provider as it would change the name of the non synthetic
   // child as well.
-  void SetName(const ConstString &name);
+  void SetName(ConstString name);
 
   virtual lldb::addr_t GetAddressOf(bool scalar_is_load_address = true,
                                     AddressType *address_type = nullptr);
 
   lldb::addr_t GetPointerValue(AddressType *address_type = nullptr);
 
-  lldb::ValueObjectSP GetSyntheticChild(const ConstString &key) const;
+  lldb::ValueObjectSP GetSyntheticChild(ConstString key) const;
 
   lldb::ValueObjectSP GetSyntheticArrayMember(size_t index, bool can_create);
 
@@ -617,7 +617,7 @@ public:
   GetQualifiedRepresentationIfAvailable(lldb::DynamicValueType dynValue,
                                         bool synthValue);
 
-  virtual lldb::ValueObjectSP CreateConstantValue(const ConstString &name);
+  virtual lldb::ValueObjectSP CreateConstantValue(ConstString name);
 
   virtual lldb::ValueObjectSP Dereference(Status &error);
 
@@ -625,7 +625,7 @@ public:
   // ValueObject as its parent. It should be used when we want to change the
   // name of a ValueObject without modifying the actual ValueObject itself
   // (e.g. sythetic child provider).
-  virtual lldb::ValueObjectSP Clone(const ConstString &new_name);
+  virtual lldb::ValueObjectSP Clone(ConstString new_name);
 
   virtual lldb::ValueObjectSP AddressOf(Status &error);
 
@@ -999,7 +999,7 @@ protected:
   void ClearUserVisibleData(
       uint32_t items = ValueObject::eClearUserVisibleDataItemsAllStrings);
 
-  void AddSyntheticChild(const ConstString &key, ValueObject *valobj);
+  void AddSyntheticChild(ConstString key, ValueObject *valobj);
 
   DataExtractor &GetDataExtractor();
 
index 1c004b2bdc761fff15f4c4c7394814b797e04248..890c66f8e35b5b16cdae99ce1970abb08803486c 100644 (file)
@@ -32,7 +32,7 @@ public:
   ~ValueObjectCast() override;
 
   static lldb::ValueObjectSP Create(ValueObject &parent,
-                                    const ConstString &name,
+                                    ConstString name,
                                     const CompilerType &cast_type);
 
   uint64_t GetByteSize() override;
@@ -52,7 +52,7 @@ public:
   }
 
 protected:
-  ValueObjectCast(ValueObject &parent, const ConstString &name,
+  ValueObjectCast(ValueObject &parent, ConstString name,
                   const CompilerType &cast_type);
 
   bool UpdateValue() override;
index 5b3c8c8030199689a832afd4244bc7d39ffa4623..d66124c08db382787b7ab36f3776ef09165e67ba 100644 (file)
@@ -83,7 +83,7 @@ protected:
   friend class ValueObjectConstResultImpl;
 
   ValueObjectChild(ValueObject &parent, const CompilerType &compiler_type,
-                   const ConstString &name, uint64_t byte_size,
+                   ConstString name, uint64_t byte_size,
                    int32_t byte_offset, uint32_t bitfield_bit_size,
                    uint32_t bitfield_bit_offset, bool is_base_class,
                    bool is_deref_of_parent,
index bb4064928c7d9d5371d164a5517ab98633087f9d..2c96dc1b6a6c90999a2da2ab107e282cfb01dd95 100644 (file)
@@ -48,22 +48,22 @@ public:
 
   static lldb::ValueObjectSP
   Create(ExecutionContextScope *exe_scope, const CompilerType &compiler_type,
-         const ConstString &name, const DataExtractor &data,
+         ConstString name, const DataExtractor &data,
          lldb::addr_t address = LLDB_INVALID_ADDRESS);
 
   static lldb::ValueObjectSP
   Create(ExecutionContextScope *exe_scope, const CompilerType &compiler_type,
-         const ConstString &name, const lldb::DataBufferSP &result_data_sp,
+         ConstString name, const lldb::DataBufferSP &result_data_sp,
          lldb::ByteOrder byte_order, uint32_t addr_size,
          lldb::addr_t address = LLDB_INVALID_ADDRESS);
 
   static lldb::ValueObjectSP
   Create(ExecutionContextScope *exe_scope, const CompilerType &compiler_type,
-         const ConstString &name, lldb::addr_t address,
+         ConstString name, lldb::addr_t address,
          AddressType address_type, uint32_t addr_byte_size);
 
   static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope,
-                                    Value &value, const ConstString &name,
+                                    Value &value, ConstString name,
                                     Module *module = nullptr);
 
   // When an expression fails to evaluate, we return an error
@@ -134,23 +134,23 @@ private:
 
   ValueObjectConstResult(ExecutionContextScope *exe_scope,
                          const CompilerType &compiler_type,
-                         const ConstString &name, const DataExtractor &data,
+                         ConstString name, const DataExtractor &data,
                          lldb::addr_t address);
 
   ValueObjectConstResult(ExecutionContextScope *exe_scope,
                          const CompilerType &compiler_type,
-                         const ConstString &name,
+                         ConstString name,
                          const lldb::DataBufferSP &result_data_sp,
                          lldb::ByteOrder byte_order, uint32_t addr_size,
                          lldb::addr_t address);
 
   ValueObjectConstResult(ExecutionContextScope *exe_scope,
                          const CompilerType &compiler_type,
-                         const ConstString &name, lldb::addr_t address,
+                         ConstString name, lldb::addr_t address,
                          AddressType address_type, uint32_t addr_byte_size);
 
   ValueObjectConstResult(ExecutionContextScope *exe_scope, const Value &value,
-                         const ConstString &name, Module *module = nullptr);
+                         ConstString name, Module *module = nullptr);
 
   ValueObjectConstResult(ExecutionContextScope *exe_scope, const Status &error);
 
index f6fa759251e3ab9b49a0ee6e144a4981d41f9d99..18eeb5d5a8d06427061c474cb687f91e2c48b67d 100644 (file)
@@ -34,7 +34,7 @@ namespace lldb_private {
 
 class ValueObjectConstResultCast : public ValueObjectCast {
 public:
-  ValueObjectConstResultCast(ValueObject &parent, const ConstString &name,
+  ValueObjectConstResultCast(ValueObject &parent, ConstString name,
                              const CompilerType &cast_type,
                              lldb::addr_t live_address = LLDB_INVALID_ADDRESS);
 
index f9dd57b79865380dfbed4ba66cc8b53310f6a18c..a86724569461b00fbda4957cd67814a57e7d92c9 100644 (file)
@@ -38,7 +38,7 @@ class ValueObjectConstResultChild : public ValueObjectChild {
 public:
   ValueObjectConstResultChild(ValueObject &parent,
                               const CompilerType &compiler_type,
-                              const ConstString &name, uint32_t byte_size,
+                              ConstString name, uint32_t byte_size,
                               int32_t byte_offset, uint32_t bitfield_bit_size,
                               uint32_t bitfield_bit_offset, bool is_base_class,
                               bool is_deref_of_parent,
index 83eb5a500602f85ecc4f0dd9e2132849374b7e28..1a830464a6600cf0898683c75273a7a2da1300fc 100644 (file)
@@ -103,10 +103,10 @@ public:
   ValueObject *CreateChildAtIndex(size_t idx, bool synthetic_array_member,
                                   int32_t synthetic_index) override;
 
-  lldb::ValueObjectSP GetChildMemberWithName(const ConstString &name,
+  lldb::ValueObjectSP GetChildMemberWithName(ConstString name,
                                              bool can_create) override;
 
-  size_t GetIndexOfChildWithName(const ConstString &name) override;
+  size_t GetIndexOfChildWithName(ConstString name) override;
 
 protected:
   bool UpdateValue() override;
index 6242ec7dbbf01f98ef44485358e0b026a6f6b625..08f83d99eb4127a4431ae6c6caa38470bd98165e 100644 (file)
@@ -62,10 +62,10 @@ public:
 
   lldb::ValueObjectSP GetChildAtIndex(size_t idx, bool can_create) override;
 
-  lldb::ValueObjectSP GetChildMemberWithName(const ConstString &name,
+  lldb::ValueObjectSP GetChildMemberWithName(ConstString name,
                                              bool can_create) override;
 
-  size_t GetIndexOfChildWithName(const ConstString &name) override;
+  size_t GetIndexOfChildWithName(ConstString name) override;
 
   lldb::ValueObjectSP
   GetDynamicValue(lldb::DynamicValueType valueType) override;
index dbeb229a97b8a964d98bad18517aa62b87073fd4..0bd30e3d99dac46c0e4dfb3e33c224096a3d935a 100644 (file)
@@ -75,13 +75,13 @@ public:
 
   class NamedSummaryFormats {
   public:
-    static bool GetSummaryFormat(const ConstString &type,
+    static bool GetSummaryFormat(ConstString type,
                                  lldb::TypeSummaryImplSP &entry);
 
-    static void Add(const ConstString &type,
+    static void Add(ConstString type,
                     const lldb::TypeSummaryImplSP &entry);
 
-    static bool Delete(const ConstString &type);
+    static bool Delete(ConstString type);
 
     static void Clear();
 
@@ -94,27 +94,27 @@ public:
 
   class Categories {
   public:
-    static bool GetCategory(const ConstString &category,
+    static bool GetCategory(ConstString category,
                             lldb::TypeCategoryImplSP &entry,
                             bool allow_create = true);
 
     static bool GetCategory(lldb::LanguageType language,
                             lldb::TypeCategoryImplSP &entry);
 
-    static void Add(const ConstString &category);
+    static void Add(ConstString category);
 
-    static bool Delete(const ConstString &category);
+    static bool Delete(ConstString category);
 
     static void Clear();
 
-    static void Clear(const ConstString &category);
+    static void Clear(ConstString category);
 
-    static void Enable(const ConstString &category,
+    static void Enable(ConstString category,
                        TypeCategoryMap::Position = TypeCategoryMap::Default);
 
     static void Enable(lldb::LanguageType lang_type);
 
-    static void Disable(const ConstString &category);
+    static void Disable(ConstString category);
 
     static void Disable(lldb::LanguageType lang_type);
 
index 39a428a203bc014450c05ef992a021f44a4da50f..7a6774b7f8378d410966ea345f9b89c0acd8b996 100644 (file)
@@ -71,29 +71,29 @@ private:
   uint64_t m_cache_hits;
   uint64_t m_cache_misses;
 
-  Entry &GetEntry(const ConstString &type);
+  Entry &GetEntry(ConstString type);
 
 public:
   FormatCache();
 
-  bool GetFormat(const ConstString &type, lldb::TypeFormatImplSP &format_sp);
+  bool GetFormat(ConstString type, lldb::TypeFormatImplSP &format_sp);
 
-  bool GetSummary(const ConstString &type, lldb::TypeSummaryImplSP &summary_sp);
+  bool GetSummary(ConstString type, lldb::TypeSummaryImplSP &summary_sp);
 
-  bool GetSynthetic(const ConstString &type,
+  bool GetSynthetic(ConstString type,
                     lldb::SyntheticChildrenSP &synthetic_sp);
 
-  bool GetValidator(const ConstString &type,
+  bool GetValidator(ConstString type,
                     lldb::TypeValidatorImplSP &summary_sp);
 
-  void SetFormat(const ConstString &type, lldb::TypeFormatImplSP &format_sp);
+  void SetFormat(ConstString type, lldb::TypeFormatImplSP &format_sp);
 
-  void SetSummary(const ConstString &type, lldb::TypeSummaryImplSP &summary_sp);
+  void SetSummary(ConstString type, lldb::TypeSummaryImplSP &summary_sp);
 
-  void SetSynthetic(const ConstString &type,
+  void SetSynthetic(ConstString type,
                     lldb::SyntheticChildrenSP &synthetic_sp);
 
-  void SetValidator(const ConstString &type,
+  void SetValidator(ConstString type,
                     lldb::TypeValidatorImplSP &synthetic_sp);
 
   void Clear();
index 14eda9c4f0e270bc2e141612a3bad7116b02b455..5c776c0b3380b95598a52d5979c8781f8c367960 100644 (file)
@@ -50,19 +50,19 @@ public:
   }
 
   void
-  EnableCategory(const ConstString &category_name,
+  EnableCategory(ConstString category_name,
                  TypeCategoryMap::Position pos = TypeCategoryMap::Default) {
     EnableCategory(category_name, pos,
                    std::initializer_list<lldb::LanguageType>());
   }
 
-  void EnableCategory(const ConstString &category_name,
+  void EnableCategory(ConstString category_name,
                       TypeCategoryMap::Position pos, lldb::LanguageType lang) {
     std::initializer_list<lldb::LanguageType> langs = {lang};
     EnableCategory(category_name, pos, langs);
   }
 
-  void EnableCategory(const ConstString &category_name,
+  void EnableCategory(ConstString category_name,
                       TypeCategoryMap::Position pos = TypeCategoryMap::Default,
                       std::initializer_list<lldb::LanguageType> langs = {}) {
     TypeCategoryMap::ValueSP category_sp;
@@ -73,7 +73,7 @@ public:
     }
   }
 
-  void DisableCategory(const ConstString &category_name) {
+  void DisableCategory(ConstString category_name) {
     m_categories_map.Disable(category_name);
   }
 
@@ -91,7 +91,7 @@ public:
 
   void DisableAllCategories();
 
-  bool DeleteCategory(const ConstString &category_name) {
+  bool DeleteCategory(ConstString category_name) {
     return m_categories_map.Delete(category_name);
   }
 
@@ -112,7 +112,7 @@ public:
     return GetCategory(ConstString(category_name));
   }
 
-  lldb::TypeCategoryImplSP GetCategory(const ConstString &category_name,
+  lldb::TypeCategoryImplSP GetCategory(ConstString category_name,
                                        bool can_create = true);
 
   lldb::TypeFormatImplSP
@@ -173,7 +173,7 @@ public:
   // method looks for the case where the user is adding a
   // "class","struct","enum" or "union" Foo and strips the unnecessary
   // qualifier
-  static ConstString GetValidTypeName(const ConstString &type);
+  static ConstString GetValidTypeName(ConstString type);
 
   // when DataExtractor dumps a vectorOfT, it uses a predefined format for each
   // item this method returns it, or eFormatInvalid if vector_format is not a
index a700bfbb70ec02e2101e36e004cea5a11724e27c..9d7d37343ac252166f8fc40e109eb1b850c53cc6 100644 (file)
@@ -42,7 +42,7 @@ public:
 // match any type because of the way we strip qualifiers from typenames this
 // method looks for the case where the user is adding a "class","struct","enum"
 // or "union" Foo and strips the unnecessary qualifier
-static inline ConstString GetValidTypeName_Impl(const ConstString &type) {
+static inline ConstString GetValidTypeName_Impl(ConstString type) {
   if (type.IsEmpty())
     return type;
 
@@ -238,7 +238,7 @@ protected:
     m_format_map.Add(type, entry);
   }
 
-  void Add_Impl(const ConstString &type, const MapValueType &entry,
+  void Add_Impl(ConstString type, const MapValueType &entry,
                 ConstString *dummy) {
     m_format_map.Add(GetValidTypeName_Impl(type), entry);
   }
index b99bc6bf0d432da711a0ab03379c012f14ef57d6..6810919ed140eb488e5667878f48a2b5c882ee0d 100644 (file)
@@ -47,7 +47,7 @@ public:
 
   virtual lldb::ValueObjectSP GetChildAtIndex(size_t idx) = 0;
 
-  virtual size_t GetIndexOfChildWithName(const ConstString &name) = 0;
+  virtual size_t GetIndexOfChildWithName(ConstString name) = 0;
 
   // this function is assumed to always succeed and it if fails, the front-end
   // should know to deal with it in the correct way (most probably, by refusing
@@ -110,7 +110,7 @@ public:
 
   lldb::ValueObjectSP GetChildAtIndex(size_t idx) override { return nullptr; }
 
-  size_t GetIndexOfChildWithName(const ConstString &name) override {
+  size_t GetIndexOfChildWithName(ConstString name) override {
     return UINT32_MAX;
   }
 
@@ -326,7 +326,7 @@ public:
 
     bool MightHaveChildren() override { return filter->GetCount() > 0; }
 
-    size_t GetIndexOfChildWithName(const ConstString &name) override;
+    size_t GetIndexOfChildWithName(ConstString name) override;
 
     typedef std::shared_ptr<SyntheticChildrenFrontEnd> SharedPointer;
 
@@ -424,7 +424,7 @@ public:
 
     bool MightHaveChildren() override;
 
-    size_t GetIndexOfChildWithName(const ConstString &name) override;
+    size_t GetIndexOfChildWithName(ConstString name) override;
 
     lldb::ValueObjectSP GetSyntheticValue() override;
 
index 3309eefa2f49998b7f5f48be4c3a2ebbc61a3a29..cde4be498b0f4e90041a63816d2051c9a977367f 100644 (file)
@@ -31,7 +31,7 @@ public:
 
   bool MightHaveChildren() override;
 
-  size_t GetIndexOfChildWithName(const ConstString &name) override;
+  size_t GetIndexOfChildWithName(ConstString name) override;
 
 private:
   ExecutionContextRef m_exe_ctx_ref;
index 387f06b55e87673225b463be9e189a1f253ef240..03b93f8d3c6bbcde85c690ca9bf9b8dbaf66479f 100644 (file)
@@ -38,7 +38,7 @@ public:
 
   size_t GetByteSize() { return m_frozen_sp->GetByteSize(); }
 
-  const ConstString &GetName() { return m_frozen_sp->GetName(); }
+  ConstString GetName() { return m_frozen_sp->GetName(); }
 
   lldb::ValueObjectSP GetValueObject() { return m_frozen_sp; }
 
@@ -61,7 +61,7 @@ public:
     m_frozen_sp->GetValue().SetCompilerType(compiler_type);
   }
 
-  void SetName(const ConstString &name) { m_frozen_sp->SetName(name); }
+  void SetName(ConstString name) { m_frozen_sp->SetName(name); }
 
   // this function is used to copy the address-of m_live_sp into m_frozen_sp
   // this is necessary because the results of certain cast and pointer-
@@ -170,7 +170,7 @@ public:
   ///     The variable requested, or nullptr if that variable is not in the
   ///     list.
   //----------------------------------------------------------------------
-  lldb::ExpressionVariableSP GetVariable(const ConstString &name) {
+  lldb::ExpressionVariableSP GetVariable(ConstString name) {
     lldb::ExpressionVariableSP var_sp;
     for (size_t index = 0, size = GetSize(); index < size; ++index) {
       var_sp = GetVariableAtIndex(index);
@@ -230,7 +230,7 @@ public:
 
   virtual lldb::ExpressionVariableSP
   CreatePersistentVariable(ExecutionContextScope *exe_scope,
-                           const ConstString &name, const CompilerType &type,
+                           ConstString name, const CompilerType &type,
                            lldb::ByteOrder byte_order,
                            uint32_t addr_byte_size) = 0;
 
@@ -244,7 +244,7 @@ public:
   virtual void
   RemovePersistentVariable(lldb::ExpressionVariableSP variable) = 0;
 
-  virtual lldb::addr_t LookupSymbol(const ConstString &name);
+  virtual lldb::addr_t LookupSymbol(ConstString name);
 
   void RegisterExecutionUnit(lldb::IRExecutionUnitSP &execution_unit_sp);
 
index 98813b2a956f5fd89f83ae98b288f7bff6bf9817..6c56d9dcfee1ef25040e3d656bf6e80780dbbb6c 100644 (file)
@@ -111,7 +111,7 @@ public:
 
   lldb::ModuleSP GetJITModule();
 
-  lldb::addr_t FindSymbol(const ConstString &name);
+  lldb::addr_t FindSymbol(ConstString name);
 
   void GetStaticInitializers(std::vector<lldb::addr_t> &static_initializers);
 
@@ -240,7 +240,7 @@ private:
   struct SearchSpec;
 
   void CollectCandidateCNames(std::vector<SearchSpec> &C_specs,
-                              const ConstString &name);
+                              ConstString name);
 
   void CollectCandidateCPlusPlusNames(std::vector<SearchSpec> &CPP_specs,
                                       const std::vector<SearchSpec> &C_specs,
@@ -258,7 +258,7 @@ private:
   lldb::addr_t FindInUserDefinedSymbols(const std::vector<SearchSpec> &specs,
                                         const lldb_private::SymbolContext &sc);
 
-  void ReportSymbolLookupError(const ConstString &name);
+  void ReportSymbolLookupError(ConstString name);
 
   class MemoryManager : public llvm::SectionMemoryManager {
   public:
index 8ba6ac97eaa1f285ba47718f94569f2a8b3261cb..1c083cc73c17f45556fb14283130852c82f4ca1a 100644 (file)
@@ -50,15 +50,15 @@ public:
       m_platform_name.clear();
   }
 
-  const ConstString &GetSDKRootDirectory() const { return m_sdk_sysroot; }
+  ConstString GetSDKRootDirectory() const { return m_sdk_sysroot; }
 
-  void SetSDKRootDirectory(const ConstString &sdk_root_directory) {
+  void SetSDKRootDirectory(ConstString sdk_root_directory) {
     m_sdk_sysroot = sdk_root_directory;
   }
 
-  const ConstString &GetSDKBuild() const { return m_sdk_build; }
+  ConstString GetSDKBuild() const { return m_sdk_build; }
 
-  void SetSDKBuild(const ConstString &sdk_build) { m_sdk_build = sdk_build; }
+  void SetSDKBuild(ConstString sdk_build) { m_sdk_build = sdk_build; }
 
   bool PlatformMatches(const lldb::PlatformSP &platform_sp) const;
 
index 80e5a43ed2dbc12e6cde58cf4f1785caf8cf9a03..3f4c14def2eb4c41120f98123fbb3a278c4e091a 100644 (file)
@@ -57,7 +57,7 @@ public:
 
   size_t GetNumValues() const { return m_values.size(); }
 
-  lldb::OptionValueSP GetValueForKey(const ConstString &key) const;
+  lldb::OptionValueSP GetValueForKey(ConstString key) const;
 
   lldb::OptionValueSP GetSubValue(const ExecutionContext *exe_ctx,
                                   llvm::StringRef name, bool will_modify,
@@ -66,11 +66,11 @@ public:
   Status SetSubValue(const ExecutionContext *exe_ctx, VarSetOperationType op,
                      llvm::StringRef name, llvm::StringRef value) override;
 
-  bool SetValueForKey(const ConstString &key,
+  bool SetValueForKey(ConstString key,
                       const lldb::OptionValueSP &value_sp,
                       bool can_replace = true);
 
-  bool DeleteValueForKey(const ConstString &key);
+  bool DeleteValueForKey(ConstString key);
 
   size_t GetArgs(Args &args) const;
 
index 01cec2abf443e59979f0010a37447298683b4a77..b8e7aa38a460654a608853fa306d7ac28717c49f 100644 (file)
@@ -26,7 +26,7 @@ public:
   OptionValueProperties()
       : OptionValue(), m_name(), m_properties(), m_name_to_index() {}
 
-  OptionValueProperties(const ConstString &name);
+  OptionValueProperties(ConstString name);
 
   OptionValueProperties(const OptionValueProperties &global_properties);
 
@@ -73,7 +73,7 @@ public:
   // collection, "name" can't be a path to a property path that refers to a
   // property within a property
   //---------------------------------------------------------------------
-  virtual uint32_t GetPropertyIndex(const ConstString &name) const;
+  virtual uint32_t GetPropertyIndex(ConstString name) const;
 
   //---------------------------------------------------------------------
   // Get a property by exact name exists in this property collection, name can
@@ -82,7 +82,7 @@ public:
   //---------------------------------------------------------------------
   virtual const Property *GetProperty(const ExecutionContext *exe_ctx,
                                       bool will_modify,
-                                      const ConstString &name) const;
+                                      ConstString name) const;
 
   virtual const Property *GetPropertyAtIndex(const ExecutionContext *exe_ctx,
                                              bool will_modify,
@@ -101,7 +101,7 @@ public:
                           uint32_t idx) const;
 
   virtual lldb::OptionValueSP GetValueForKey(const ExecutionContext *exe_ctx,
-                                             const ConstString &key,
+                                             ConstString key,
                                              bool value_will_be_modified) const;
 
   lldb::OptionValueSP GetSubValue(const ExecutionContext *exe_ctx,
@@ -199,11 +199,11 @@ public:
   OptionValueFileSpecList *GetPropertyAtIndexAsOptionValueFileSpecList(
       const ExecutionContext *exe_ctx, bool will_modify, uint32_t idx) const;
 
-  void AppendProperty(const ConstString &name, const ConstString &desc,
+  void AppendProperty(ConstString name, ConstString desc,
                       bool is_global, const lldb::OptionValueSP &value_sp);
 
   lldb::OptionValuePropertiesSP GetSubProperty(const ExecutionContext *exe_ctx,
-                                               const ConstString &name);
+                                               ConstString name);
 
   void SetValueChangedCallback(uint32_t property_idx,
                                OptionValueChangedCallback callback,
index 14793b3bd34ef967ba41ea8a6cf481399193414b..797aee4be81595ec4ea6fc4801f1d0ed05ebe381 100644 (file)
@@ -37,7 +37,7 @@ class Property {
 public:
   Property(const PropertyDefinition &definition);
 
-  Property(const ConstString &name, const ConstString &desc, bool is_global,
+  Property(ConstString name, ConstString desc, bool is_global,
            const lldb::OptionValueSP &value_sp);
 
   llvm::StringRef GetName() const { return m_name.GetStringRef(); }
index d33a7d89c964739e9676c87359a1e31a8aaa6950..3382ed1ed8d548fce63ff1b27de11d177ad810bf 100644 (file)
@@ -168,9 +168,9 @@ public:
                                    lldb::BasicType type);
 
   static CompilerType GetBasicType(clang::ASTContext *ast,
-                                   const ConstString &name);
+                                   ConstString name);
 
-  static lldb::BasicType GetBasicTypeEnumeration(const ConstString &name);
+  static lldb::BasicType GetBasicTypeEnumeration(ConstString name);
 
   CompilerType GetBuiltinTypeForDWARFEncodingAndBitSize(const char *type_name,
                                                         uint32_t dw_ate,
@@ -211,7 +211,7 @@ public:
 
   template <typename RecordDeclType>
   CompilerType
-  GetTypeForIdentifier(const ConstString &type_name,
+  GetTypeForIdentifier(ConstString type_name,
                        clang::DeclContext *decl_context = nullptr) {
     CompilerType compiler_type;
 
@@ -243,13 +243,13 @@ public:
   }
 
   CompilerType CreateStructForIdentifier(
-      const ConstString &type_name,
+      ConstString type_name,
       const std::initializer_list<std::pair<const char *, CompilerType>>
           &type_fields,
       bool packed = false);
 
   CompilerType GetOrCreateStructForIdentifier(
-      const ConstString &type_name,
+      ConstString type_name,
       const std::initializer_list<std::pair<const char *, CompilerType>>
           &type_fields,
       bool packed = false);
@@ -747,19 +747,19 @@ public:
                           bool omit_empty_base_classes,
                           const ExecutionContext *exe_ctx) override;
 
-  CompilerType GetBuiltinTypeByName(const ConstString &name) override;
+  CompilerType GetBuiltinTypeByName(ConstString name) override;
 
   lldb::BasicType
   GetBasicTypeEnumeration(lldb::opaque_compiler_type_t type) override;
 
   static lldb::BasicType
   GetBasicTypeEnumeration(lldb::opaque_compiler_type_t type,
-                          const ConstString &name);
+                          ConstString name);
 
   void ForEachEnumerator(
       lldb::opaque_compiler_type_t type,
       std::function<bool(const CompilerType &integer_type,
-                         const ConstString &name,
+                         ConstString name,
                          const llvm::APSInt &value)> const &callback) override;
 
   uint32_t GetNumFields(lldb::opaque_compiler_type_t type) override;
index ab66e753e9c87289d01d6eee65ca09910e509822..65e4785a9f441ddf67f6cbb2f5a2887467e1b57e 100644 (file)
@@ -187,7 +187,7 @@ public:
     virtual ~MapCompleter();
 
     virtual void CompleteNamespaceMap(NamespaceMapSP &namespace_map,
-                                      const ConstString &name,
+                                      ConstString name,
                                       NamespaceMapSP &parent_map) const = 0;
   };
 
index 9d44a777a26f58404503b300f3f768b43bd0aefb..6bdadabfe7bd75ab861f708c020ac48cb69e9f8c 100644 (file)
@@ -302,7 +302,7 @@ public:
 
   lldb::BasicType GetBasicTypeEnumeration() const;
 
-  static lldb::BasicType GetBasicTypeEnumeration(const ConstString &name);
+  static lldb::BasicType GetBasicTypeEnumeration(ConstString name);
 
   //----------------------------------------------------------------------
   // If this type is an enumeration, iterate through all of its enumerators
@@ -311,7 +311,7 @@ public:
   //----------------------------------------------------------------------
   void ForEachEnumerator(
       std::function<bool(const CompilerType &integer_type,
-                         const ConstString &name,
+                         ConstString name,
                          const llvm::APSInt &value)> const &callback) const;
 
   uint32_t GetNumFields() const;
index 8fd952365fccc33d1f00b5fdd5a92e1a67fda8e1..3082f22257d3484ac96e347ee32d136bca807c91 100644 (file)
@@ -49,7 +49,7 @@ public:
   ///     The number of Decls added to decls; will not exceed
   ///     max_matches.
   //------------------------------------------------------------------
-  virtual uint32_t FindDecls(const ConstString &name, bool append,
+  virtual uint32_t FindDecls(ConstString name, bool append,
                              uint32_t max_matches,
                              std::vector<clang::NamedDecl *> &decls) = 0;
 
index b13a3e6f3baf59f77e79c1e08f9df129993b5d57..cf4e80ade0e97e0beb6bc996b55d4a767b0347e8 100644 (file)
@@ -55,7 +55,7 @@ public:
   ///     Optional declaration information that describes where the
   ///     function was declared. This can be NULL.
   //------------------------------------------------------------------
-  FunctionInfo(const ConstString &name, const Declaration *decl_ptr);
+  FunctionInfo(ConstString name, const Declaration *decl_ptr);
 
   //------------------------------------------------------------------
   /// Destructor.
@@ -190,7 +190,7 @@ public:
   ///     Optional calling location declaration information that
   ///     describes from where this inlined function was called.
   //------------------------------------------------------------------
-  InlineFunctionInfo(const ConstString &name, const Mangled &mangled,
+  InlineFunctionInfo(ConstString name, const Mangled &mangled,
                      const Declaration *decl_ptr,
                      const Declaration *call_decl_ptr);
 
index e38f39b701e978e4bc5f977a61d31469b622b663..11a9a1eb0044c44001b635805368d5e05e5299e0 100644 (file)
@@ -42,7 +42,7 @@ public:
 
   void Clear();
 
-  bool Compare(const ConstString &name, lldb::SymbolType type) const;
+  bool Compare(ConstString name, lldb::SymbolType type) const;
 
   void Dump(Stream *s, Target *target, uint32_t index) const;
 
@@ -133,7 +133,7 @@ public:
 
   FileSpec GetReExportedSymbolSharedLibrary() const;
 
-  void SetReExportedSymbolName(const ConstString &name);
+  void SetReExportedSymbolName(ConstString name);
 
   bool SetReExportedSymbolSharedLibrary(const FileSpec &fspec);
 
index de4c03fe0d1d4f916cc4c4bc1935cb224fd04886..a8fa9df79bdf6f267fd0b6853c49c4ab5f3667bb 100644 (file)
@@ -249,7 +249,7 @@ public:
   /// @return
   ///     The symbol that was found, or \b nullptr if none was found.
   //------------------------------------------------------------------
-  const Symbol *FindBestGlobalDataSymbol(const ConstString &name, Status &error);
+  const Symbol *FindBestGlobalDataSymbol(ConstString name, Status &error);
 
   void GetDescription(Stream *s, lldb::DescriptionLevel level,
                       Target *target) const;
index b77f167c22570031aaa6b76a9680f2721e8f7371..01943bea7b1ec4b5c807225a67bb5d6efc22dedb 100644 (file)
@@ -178,13 +178,13 @@ public:
 
   virtual void DumpClangAST(Stream &s) {}
   virtual uint32_t
-  FindGlobalVariables(const ConstString &name,
+  FindGlobalVariables(ConstString name,
                       const CompilerDeclContext *parent_decl_ctx,
                       uint32_t max_matches, VariableList &variables);
   virtual uint32_t FindGlobalVariables(const RegularExpression &regex,
                                        uint32_t max_matches,
                                        VariableList &variables);
-  virtual uint32_t FindFunctions(const ConstString &name,
+  virtual uint32_t FindFunctions(ConstString name,
                                  const CompilerDeclContext *parent_decl_ctx,
                                  lldb::FunctionNameType name_type_mask,
                                  bool include_inlines, bool append,
@@ -193,7 +193,7 @@ public:
                                  bool include_inlines, bool append,
                                  SymbolContextList &sc_list);
   virtual uint32_t
-  FindTypes(const ConstString &name, const CompilerDeclContext *parent_decl_ctx,
+  FindTypes(ConstString name, const CompilerDeclContext *parent_decl_ctx,
             bool append, uint32_t max_matches,
             llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
             TypeMap &types);
@@ -217,7 +217,7 @@ public:
   GetTypeSystemForLanguage(lldb::LanguageType language);
 
   virtual CompilerDeclContext
-  FindNamespace(const ConstString &name,
+  FindNamespace(ConstString name,
                 const CompilerDeclContext *parent_decl_ctx) {
     return CompilerDeclContext();
   }
index 27b2ac99af04c7aa9276b78c956f88e299764a6e..4767e92ff5794207bd51879b3de413e55fb68f6d 100644 (file)
@@ -80,7 +80,7 @@ public:
                                         lldb::SymbolContextItem resolve_scope,
                                         SymbolContextList &sc_list);
 
-  virtual size_t FindGlobalVariables(const ConstString &name,
+  virtual size_t FindGlobalVariables(ConstString name,
                                      const CompilerDeclContext *parent_decl_ctx,
                                      size_t max_matches,
                                      VariableList &variables);
@@ -89,7 +89,7 @@ public:
                                      size_t max_matches,
                                      VariableList &variables);
 
-  virtual size_t FindFunctions(const ConstString &name,
+  virtual size_t FindFunctions(ConstString name,
                                const CompilerDeclContext *parent_decl_ctx,
                                lldb::FunctionNameType name_type_mask,
                                bool include_inlines, bool append,
@@ -100,7 +100,7 @@ public:
                                SymbolContextList &sc_list);
 
   virtual size_t
-  FindTypes(const ConstString &name, const CompilerDeclContext *parent_decl_ctx,
+  FindTypes(ConstString name, const CompilerDeclContext *parent_decl_ctx,
             bool append, size_t max_matches,
             llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
             TypeMap &types);
@@ -109,7 +109,7 @@ public:
                            bool append, TypeMap &types);
 
   virtual CompilerDeclContext
-  FindNamespace(const ConstString &name,
+  FindNamespace(ConstString name,
                 const CompilerDeclContext *parent_decl_ctx);
 
   virtual size_t GetNumCompileUnits();
index 7ed7d344c77ac86b31f05c44605620fca3a23847..3d47b5dee9063d8502432678ee433e66b57cbea7 100644 (file)
@@ -76,16 +76,16 @@ public:
                                        std::vector<uint32_t> &matches,
                                        uint32_t start_idx = 0,
                                        uint32_t end_index = UINT32_MAX) const;
-  uint32_t AppendSymbolIndexesWithName(const ConstString &symbol_name,
+  uint32_t AppendSymbolIndexesWithName(ConstString symbol_name,
                                        std::vector<uint32_t> &matches);
-  uint32_t AppendSymbolIndexesWithName(const ConstString &symbol_name,
+  uint32_t AppendSymbolIndexesWithName(ConstString symbol_name,
                                        Debug symbol_debug_type,
                                        Visibility symbol_visibility,
                                        std::vector<uint32_t> &matches);
-  uint32_t AppendSymbolIndexesWithNameAndType(const ConstString &symbol_name,
+  uint32_t AppendSymbolIndexesWithNameAndType(ConstString symbol_name,
                                               lldb::SymbolType symbol_type,
                                               std::vector<uint32_t> &matches);
-  uint32_t AppendSymbolIndexesWithNameAndType(const ConstString &symbol_name,
+  uint32_t AppendSymbolIndexesWithNameAndType(ConstString symbol_name,
                                               lldb::SymbolType symbol_type,
                                               Debug symbol_debug_type,
                                               Visibility symbol_visibility,
@@ -98,10 +98,10 @@ public:
       const RegularExpression &regex, lldb::SymbolType symbol_type,
       Debug symbol_debug_type, Visibility symbol_visibility,
       std::vector<uint32_t> &indexes);
-  size_t FindAllSymbolsWithNameAndType(const ConstString &name,
+  size_t FindAllSymbolsWithNameAndType(ConstString name,
                                        lldb::SymbolType symbol_type,
                                        std::vector<uint32_t> &symbol_indexes);
-  size_t FindAllSymbolsWithNameAndType(const ConstString &name,
+  size_t FindAllSymbolsWithNameAndType(ConstString name,
                                        lldb::SymbolType symbol_type,
                                        Debug symbol_debug_type,
                                        Visibility symbol_visibility,
@@ -110,7 +110,7 @@ public:
       const RegularExpression &regex, lldb::SymbolType symbol_type,
       Debug symbol_debug_type, Visibility symbol_visibility,
       std::vector<uint32_t> &symbol_indexes);
-  Symbol *FindFirstSymbolWithNameAndType(const ConstString &name,
+  Symbol *FindFirstSymbolWithNameAndType(ConstString name,
                                          lldb::SymbolType symbol_type,
                                          Debug symbol_debug_type,
                                          Visibility symbol_visibility);
@@ -118,7 +118,7 @@ public:
   Symbol *FindSymbolContainingFileAddress(lldb::addr_t file_addr);
   void ForEachSymbolContainingFileAddress(
       lldb::addr_t file_addr, std::function<bool(Symbol *)> const &callback);
-  size_t FindFunctionSymbols(const ConstString &name, uint32_t name_type_mask,
+  size_t FindFunctionSymbols(ConstString name, uint32_t name_type_mask,
                              SymbolContextList &sc_list);
   void CalculateSymbolSizes();
 
index e0fe1fb1b3a488cc6141d001b761221603e13203..f4638ffd333c0784aec102986860608a47a300b8 100644 (file)
@@ -27,7 +27,7 @@ namespace lldb_private {
 // detailed lookups in SymbolVendor and SymbolFile functions.
 //----------------------------------------------------------------------
 struct CompilerContext {
-  CompilerContext(CompilerContextKind t, const ConstString &n)
+  CompilerContext(CompilerContextKind t, ConstString n)
       : type(t), name(n) {}
 
   bool operator==(const CompilerContext &rhs) const {
@@ -94,7 +94,7 @@ public:
     eResolveStateFull = 3
   } ResolveState;
 
-  Type(lldb::user_id_t uid, SymbolFile *symbol_file, const ConstString &name,
+  Type(lldb::user_id_t uid, SymbolFile *symbol_file, ConstString name,
        llvm::Optional<uint64_t> byte_size, SymbolContextScope *context,
        lldb::user_id_t encoding_uid, EncodingDataType encoding_uid_type,
        const Declaration &decl, const CompilerType &compiler_qual_type,
@@ -125,7 +125,7 @@ public:
 
   TypeList *GetTypeList();
 
-  const ConstString &GetName();
+  ConstString GetName();
 
   llvm::Optional<uint64_t> GetByteSize();
 
@@ -139,7 +139,7 @@ public:
 
   lldb::TypeSP GetTypedefType();
 
-  const ConstString &GetName() const { return m_name; }
+  ConstString GetName() const { return m_name; }
 
   ConstString GetQualifiedName();
 
@@ -478,7 +478,7 @@ public:
   {}
 
   TypeMemberImpl(const lldb::TypeImplSP &type_impl_sp, uint64_t bit_offset,
-                 const ConstString &name, uint32_t bitfield_bit_size = 0,
+                 ConstString name, uint32_t bitfield_bit_size = 0,
                  bool is_bitfield = false)
       : m_type_impl_sp(type_impl_sp), m_bit_offset(bit_offset), m_name(name),
         m_bitfield_bit_size(bitfield_bit_size), m_is_bitfield(is_bitfield) {}
@@ -492,7 +492,7 @@ public:
 
   const lldb::TypeImplSP &GetTypeImpl() { return m_type_impl_sp; }
 
-  const ConstString &GetName() const { return m_name; }
+  ConstString GetName() const { return m_name; }
 
   uint64_t GetBitOffset() const { return m_bit_offset; }
 
@@ -545,7 +545,7 @@ public:
 
   CompilerType GetCompilerType() const { return m_type_pair.GetCompilerType(); }
 
-  void SetName(const ConstString &type_name);
+  void SetName(ConstString type_name);
 
   void SetName(const char *type_name_cstr);
 
@@ -617,7 +617,7 @@ public:
       : m_integer_type_sp(), m_name("<invalid>"), m_value(), m_valid(false) {}
 
   TypeEnumMemberImpl(const lldb::TypeImplSP &integer_type_sp,
-                     const ConstString &name, const llvm::APSInt &value);
+                     ConstString name, const llvm::APSInt &value);
 
   TypeEnumMemberImpl(const TypeEnumMemberImpl &rhs)
       : m_integer_type_sp(rhs.m_integer_type_sp), m_name(rhs.m_name),
@@ -627,7 +627,7 @@ public:
 
   bool IsValid() { return m_valid; }
 
-  const ConstString &GetName() const { return m_name; }
+  ConstString GetName() const { return m_name; }
 
   const lldb::TypeImplSP &GetIntegerType() const { return m_integer_type_sp; }
 
index 20c34f74e4d274521972e3cf860e03059538fffd..8862fd82438f0e4948fed3d1e97d870bfeb6300b 100644 (file)
@@ -33,7 +33,7 @@ public:
   //    lldb::TypeSP
   //    FindType(lldb::user_id_t uid);
 
-  TypeList FindTypes(const ConstString &name);
+  TypeList FindTypes(ConstString name);
 
   void Insert(const lldb::TypeSP &type);
 
index 34bfc08481b1893bf0ab7d9a5174d4941586b912..abf1cf365c911d6b7bfbdf83c94c317164962afb 100644 (file)
@@ -30,7 +30,7 @@ public:
 
   void Dump(Stream *s, bool show_context);
 
-  TypeMap FindTypes(const ConstString &name);
+  TypeMap FindTypes(ConstString name);
 
   void Insert(const lldb::TypeSP &type);
 
index 2e1d83083cdc9102595afb762fd57609bd3a84d3..40aecbd74a1eca935042d0c9848b63ca0da912cc 100644 (file)
@@ -283,7 +283,7 @@ public:
                                   bool omit_empty_base_classes,
                                   const ExecutionContext *exe_ctx) = 0;
 
-  virtual CompilerType GetBuiltinTypeByName(const ConstString &name);
+  virtual CompilerType GetBuiltinTypeByName(ConstString name);
 
   virtual lldb::BasicType
   GetBasicTypeEnumeration(lldb::opaque_compiler_type_t type) = 0;
@@ -291,7 +291,7 @@ public:
   virtual void ForEachEnumerator(
       lldb::opaque_compiler_type_t type,
       std::function<bool(const CompilerType &integer_type,
-                         const ConstString &name,
+                         ConstString name,
                          const llvm::APSInt &value)> const &callback) {}
 
   virtual uint32_t GetNumFields(lldb::opaque_compiler_type_t type) = 0;
index 11c294e3641f56223693011b988ee2e17ae62572..b7118f023c8b6fbf8a3cb1f30a9e7a16343da1c2 100644 (file)
@@ -57,7 +57,7 @@ public:
   // namespace)::i", this function will allow a generic match function that can
   // be called by commands and expression parsers to make sure we match
   // anything we come across.
-  bool NameMatches(const ConstString &name) const;
+  bool NameMatches(ConstString name) const;
 
   bool NameMatches(const RegularExpression &regex) const;
 
index d9f79ded45e7888df8beefe0131acdf273fe96a8..7b3d6091bb1af1af12b6677093d926ffd743fc34 100644 (file)
@@ -38,10 +38,10 @@ public:
 
   lldb::VariableSP RemoveVariableAtIndex(size_t idx);
 
-  lldb::VariableSP FindVariable(const ConstString &name,
+  lldb::VariableSP FindVariable(ConstString name,
                                 bool include_static_members = true);
 
-  lldb::VariableSP FindVariable(const ConstString &name,
+  lldb::VariableSP FindVariable(ConstString name,
                                 lldb::ValueType value_type,
                                 bool include_static_members = true);
 
index b2e1a1279ab59786d9a8e25eb6f9a370dd388ec6..a3cd544a0384103c73c938fa58509c5c6e8f36b3 100644 (file)
@@ -128,7 +128,7 @@ public:
 
   virtual const RegisterInfo *GetRegisterInfoArray(uint32_t &count) = 0;
 
-  bool GetRegisterInfoByName(const ConstString &name, RegisterInfo &info);
+  bool GetRegisterInfoByName(ConstString name, RegisterInfo &info);
 
   bool GetRegisterInfoByKind(lldb::RegisterKind reg_kind, uint32_t reg_num,
                              RegisterInfo &info);
index 94cabde5ea929467e1ece4e2a6159f6a475c6942..bd6dfbfb7af5e61c8e66b5fc5184b4c9bc4f903c 100644 (file)
@@ -44,7 +44,7 @@ public:
 
   OptionalBool GetMapped() const { return m_mapped; }
 
-  const ConstString &GetName() const { return m_name; }
+  ConstString GetName() const { return m_name; }
 
   void SetReadable(OptionalBool val) { m_read = val; }
 
index 1e8a110776c9501f96b22645797e4276382a4cb9..1cfbbd0506c7d090a64a44844e29c6862189e569 100644 (file)
@@ -200,7 +200,7 @@ public:
   ClassDescriptorSP GetNonKVOClassDescriptor(ValueObject &in_value);
 
   virtual ClassDescriptorSP
-  GetClassDescriptorFromClassName(const ConstString &class_name);
+  GetClassDescriptorFromClassName(ConstString class_name);
 
   virtual ClassDescriptorSP GetClassDescriptorFromISA(ObjCISA isa);
 
@@ -253,7 +253,7 @@ public:
     }
   }
 
-  virtual ObjCISA GetISA(const ConstString &name);
+  virtual ObjCISA GetISA(ConstString name);
 
   virtual ConstString GetActualTypeName(ObjCISA isa);
 
@@ -270,7 +270,7 @@ public:
   // Given the name of an Objective-C runtime symbol (e.g., ivar offset
   // symbol), try to determine from the runtime what the value of that symbol
   // would be. Useful when the underlying binary is stripped.
-  virtual lldb::addr_t LookupRuntimeSymbol(const ConstString &name) {
+  virtual lldb::addr_t LookupRuntimeSymbol(ConstString name) {
     return LLDB_INVALID_ADDRESS;
   }
 
@@ -386,12 +386,12 @@ protected:
   CompleteClassMap m_complete_class_cache;
 
   struct ConstStringSetHelpers {
-    size_t operator()(const ConstString &arg) const // for hashing
+    size_t operator()(ConstString arg) const // for hashing
     {
       return (size_t)arg.GetCString();
     }
-    bool operator()(const ConstString &arg1,
-                    const ConstString &arg2) const // for equality
+    bool operator()(ConstString arg1,
+                    ConstString arg2) const // for equality
     {
       return arg1.operator==(arg2);
     }
@@ -401,7 +401,7 @@ protected:
       CompleteClassSet;
   CompleteClassSet m_negative_complete_class_cache;
 
-  ISAToDescriptorIterator GetDescriptorIterator(const ConstString &name);
+  ISAToDescriptorIterator GetDescriptorIterator(ConstString name);
 
   friend class ::CommandObjectObjC_ClassTable_Dump;
 
index 8e0b854cc64de975a7949908192194abf81f6f19..a6f96bf8f3234147f602d37aa8dce4a3484d2c8f 100644 (file)
@@ -34,7 +34,7 @@ public:
 
   const PathMappingList &operator=(const PathMappingList &rhs);
 
-  void Append(const ConstString &path, const ConstString &replacement,
+  void Append(ConstString path, ConstString replacement,
               bool notify);
 
   void Append(const PathMappingList &rhs, bool notify);
@@ -51,19 +51,19 @@ public:
   bool GetPathsAtIndex(uint32_t idx, ConstString &path,
                        ConstString &new_path) const;
 
-  void Insert(const ConstString &path, const ConstString &replacement,
+  void Insert(ConstString path, ConstString replacement,
               uint32_t insert_idx, bool notify);
 
   bool Remove(size_t index, bool notify);
 
-  bool Remove(const ConstString &path, bool notify);
+  bool Remove(ConstString path, bool notify);
 
-  bool Replace(const ConstString &path, const ConstString &replacement,
+  bool Replace(ConstString path, ConstString replacement,
                bool notify);
 
-  bool Replace(const ConstString &path, const ConstString &replacement,
+  bool Replace(ConstString path, ConstString replacement,
                uint32_t index, bool notify);
-  bool RemapPath(const ConstString &path, ConstString &new_path) const;
+  bool RemapPath(ConstString path, ConstString &new_path) const;
 
   //------------------------------------------------------------------
   /// Remaps a source file given \a path into \a new_path.
@@ -109,7 +109,7 @@ public:
   //------------------------------------------------------------------
   bool FindFile(const FileSpec &orig_spec, FileSpec &new_spec) const;
 
-  uint32_t FindIndexForPath(const ConstString &path) const;
+  uint32_t FindIndexForPath(ConstString path) const;
 
   uint32_t GetModificationID() const { return m_mod_id; }
 
@@ -119,9 +119,9 @@ protected:
   typedef collection::iterator iterator;
   typedef collection::const_iterator const_iterator;
 
-  iterator FindIteratorForPath(const ConstString &path);
+  iterator FindIteratorForPath(ConstString path);
 
-  const_iterator FindIteratorForPath(const ConstString &path) const;
+  const_iterator FindIteratorForPath(ConstString path) const;
 
   collection m_pairs;
   ChangedCallback m_callback;
index 9c18a47ffee331f9b1032b5bfe5fa25794935f30..fba8f0e72af661f88075dad1342c6073b618ed00 100644 (file)
@@ -108,9 +108,9 @@ public:
   static void SetHostPlatform(const lldb::PlatformSP &platform_sp);
 
   // Find an existing platform plug-in by name
-  static lldb::PlatformSP Find(const ConstString &name);
+  static lldb::PlatformSP Find(ConstString name);
 
-  static lldb::PlatformSP Create(const ConstString &name, Status &error);
+  static lldb::PlatformSP Create(ConstString name, Status &error);
 
   static lldb::PlatformSP Create(const ArchSpec &arch,
                                  ArchSpec *platform_arch_ptr, Status &error);
@@ -137,7 +137,7 @@ public:
   ///     should be used. If nullptr, pick the best plug-in.
   //------------------------------------------------------------------
   //        static lldb::PlatformSP
-  //        FindPlugin (Process *process, const ConstString &plugin_name);
+  //        FindPlugin (Process *process, ConstString plugin_name);
 
   //------------------------------------------------------------------
   /// Set the target's executable based off of the existing architecture
@@ -518,13 +518,13 @@ public:
   // Used for column widths
   size_t GetMaxGroupIDNameLength() const { return m_max_gid_name_len; }
 
-  const ConstString &GetSDKRootDirectory() const { return m_sdk_sysroot; }
+  ConstString GetSDKRootDirectory() const { return m_sdk_sysroot; }
 
-  void SetSDKRootDirectory(const ConstString &dir) { m_sdk_sysroot = dir; }
+  void SetSDKRootDirectory(ConstString dir) { m_sdk_sysroot = dir; }
 
-  const ConstString &GetSDKBuild() const { return m_sdk_build; }
+  ConstString GetSDKBuild() const { return m_sdk_build; }
 
-  void SetSDKBuild(const ConstString &sdk_build) { m_sdk_build = sdk_build; }
+  void SetSDKBuild(ConstString sdk_build) { m_sdk_build = sdk_build; }
 
   // Override this to return true if your platform supports Clang modules. You
   // may also need to override AddClangModuleCompilationOptions to pass the
index e86a8a1ad1725f68bb1aeb4fa0809409919a8648..27af037cdd4754bcbc02de94e361831734537521 100644 (file)
@@ -449,9 +449,9 @@ public:
 
     ~ProcessEventData() override;
 
-    static const ConstString &GetFlavorString();
+    static ConstString GetFlavorString();
 
-    const ConstString &GetFlavor() const override;
+    ConstString GetFlavor() const override;
 
     lldb::ProcessSP GetProcessSP() const { return m_process_wp.lock(); }
 
@@ -2596,7 +2596,7 @@ public:
   ///     Returns the result of attempting to configure the feature.
   //------------------------------------------------------------------
   virtual Status
-  ConfigureStructuredData(const ConstString &type_name,
+  ConfigureStructuredData(ConstString type_name,
                           const StructuredData::ObjectSP &config_sp);
 
   //------------------------------------------------------------------
@@ -2630,7 +2630,7 @@ public:
   ///     otherwise, returns an empty shared pointer.
   //------------------------------------------------------------------
   lldb::StructuredDataPluginSP
-  GetStructuredDataPlugin(const ConstString &type_name) const;
+  GetStructuredDataPlugin(ConstString type_name) const;
 
   //------------------------------------------------------------------
   /// Starts tracing with the configuration provided in options. To enable
@@ -2845,7 +2845,7 @@ protected:
   ///
   ///     virtual void
   ///     HandleArrivalOfStructuredData(Process &process,
-  ///                                   const ConstString &type_name,
+  ///                                   ConstString type_name,
   ///                                   const StructuredData::ObjectSP
   ///                                   &object_sp)
   ///
index 7fcdc8f859976650432b8cbe1c9080ec4746a5e8..7e5534582dd82d686fdbb579c8f786c859af0dab 100644 (file)
@@ -100,8 +100,8 @@ private:
 class StackFrameRecognizerManager {
 public:
   static void AddRecognizer(lldb::StackFrameRecognizerSP recognizer,
-                            const ConstString &module,
-                            const ConstString &symbol,
+                            ConstString module,
+                            ConstString symbol,
                             bool first_instruction_only = true);
 
   static void AddRecognizer(lldb::StackFrameRecognizerSP recognizer,
index 1be6cec97056143abdbdeab007e58a03c0dda1fc..a3c9c4524185e9b6689efa0f4ffa5ed8032cd326 100644 (file)
@@ -70,7 +70,7 @@ public:
   /// @return
   ///     true if the plugin supports the feature; otherwise, false.
   // -------------------------------------------------------------------------
-  virtual bool SupportsStructuredDataType(const ConstString &type_name) = 0;
+  virtual bool SupportsStructuredDataType(ConstString type_name) = 0;
 
   // -------------------------------------------------------------------------
   /// Handle the arrival of asynchronous structured data from the process.
@@ -100,7 +100,7 @@ public:
   ///     structured data type name.
   // -------------------------------------------------------------------------
   virtual void
-  HandleArrivalOfStructuredData(Process &process, const ConstString &type_name,
+  HandleArrivalOfStructuredData(Process &process, ConstString type_name,
                                 const StructuredData::ObjectSP &object_sp) = 0;
 
   // -------------------------------------------------------------------------
@@ -136,7 +136,7 @@ public:
   ///     The name of the feature tag for the asynchronous structured data.
   ///     This is needed for plugins that support more than one feature.
   // -------------------------------------------------------------------------
-  virtual bool GetEnabled(const ConstString &type_name) const;
+  virtual bool GetEnabled(ConstString type_name) const;
 
   // -------------------------------------------------------------------------
   /// Allow the plugin to do work related to modules that loaded in the
index 5370b170451d4016d30a5e9d10c73970b6d10470..56949a5f7fb9ef5f946d164b75157e0cda7e1254 100644 (file)
@@ -462,9 +462,9 @@ public:
 
     ~TargetEventData() override;
 
-    static const ConstString &GetFlavorString();
+    static ConstString GetFlavorString();
 
-    const ConstString &GetFlavor() const override {
+    ConstString GetFlavor() const override {
       return TargetEventData::GetFlavorString();
     }
 
@@ -680,12 +680,12 @@ public:
                            Status &error);
   
   void RemoveNameFromBreakpoint(lldb::BreakpointSP &bp_sp, 
-                                const ConstString &name);
+                                ConstString name);
   
-  BreakpointName *FindBreakpointName(const ConstString &name, bool can_create, 
+  BreakpointName *FindBreakpointName(ConstString name, bool can_create, 
                                      Status &error);
                                      
-  void DeleteBreakpointName(const ConstString &name);
+  void DeleteBreakpointName(ConstString name);
   
   void ConfigureBreakpointName(BreakpointName &bp_name,
                                const BreakpointOptions &options,
@@ -1111,14 +1111,14 @@ public:
       std::string *fixed_expression = nullptr,
       ValueObject *ctx_obj = nullptr);
 
-  lldb::ExpressionVariableSP GetPersistentVariable(const ConstString &name);
+  lldb::ExpressionVariableSP GetPersistentVariable(ConstString name);
 
   /// Return the next available number for numbered persistent variables.
   unsigned GetNextPersistentVariableIndex() {
     return m_next_persistent_variable_index++;
   }
 
-  lldb::addr_t GetPersistentSymbol(const ConstString &name);
+  lldb::addr_t GetPersistentSymbol(ConstString name);
 
   //------------------------------------------------------------------
   // Target Stop Hooks
index 2da1fc74b46426b458d4bd84ec5d625c7a042aa3..600ab8bedf6bd4d7e689cf728b68f97eaa3f0fac 100644 (file)
@@ -91,9 +91,9 @@ public:
 
     ~ThreadEventData() override;
 
-    static const ConstString &GetFlavorString();
+    static ConstString GetFlavorString();
 
-    const ConstString &GetFlavor() const override {
+    ConstString GetFlavor() const override {
       return ThreadEventData::GetFlavorString();
     }
 
index d8b06aeb1dd1af16768ef8d5ece84541ec19428a..671ec8fd117b7e9e8d3e1d025fb47f07a31a46d0 100644 (file)
@@ -351,7 +351,7 @@ public:
   /// @return A ConstString ref containing the distribution id,
   ///         potentially empty.
   //------------------------------------------------------------------
-  const ConstString &GetDistributionId() const;
+  ConstString GetDistributionId() const;
 
   //------------------------------------------------------------------
   /// Set the distribution id of the architecture.
index 5dd079b3ae56f21388b9f942c6ab710d0504aff4..a4c92ef2795bc88afabef8be662fc2924931a0db 100644 (file)
@@ -47,14 +47,14 @@ namespace lldb_private {
 //----------------------------------------------------------------------
 class BroadcastEventSpec {
 public:
-  BroadcastEventSpec(const ConstString &broadcaster_class, uint32_t event_bits)
+  BroadcastEventSpec(ConstString broadcaster_class, uint32_t event_bits)
       : m_broadcaster_class(broadcaster_class), m_event_bits(event_bits) {}
 
   BroadcastEventSpec(const BroadcastEventSpec &rhs);
 
   ~BroadcastEventSpec() = default;
 
-  const ConstString &GetBroadcasterClass() const { return m_broadcaster_class; }
+  ConstString GetBroadcasterClass() const { return m_broadcaster_class; }
 
   uint32_t GetEventBits() const { return m_event_bits; }
 
@@ -128,7 +128,7 @@ private:
 
   class BroadcasterClassMatches {
   public:
-    BroadcasterClassMatches(const ConstString &broadcaster_class)
+    BroadcasterClassMatches(ConstString broadcaster_class)
         : m_broadcaster_class(broadcaster_class) {}
 
     ~BroadcasterClassMatches() = default;
@@ -351,7 +351,7 @@ public:
   /// @return
   ///     The NULL terminated C string name of this Broadcaster.
   //------------------------------------------------------------------
-  const ConstString &GetBroadcasterName() { return m_broadcaster_name; }
+  ConstString GetBroadcasterName() { return m_broadcaster_name; }
 
   //------------------------------------------------------------------
   /// Get the event name(s) for one or more event bits.
index 8fd882fa5af8d963fcfca7492a3ab87f21692011..9c9848b96a31b9bce60d468b3a6639d41bd93b76 100644 (file)
@@ -151,7 +151,7 @@ public:
   /// @return
   ///     A const reference to this object.
   //------------------------------------------------------------------
-  const ConstString &operator=(const ConstString &rhs) {
+  ConstString operator=(ConstString rhs) {
     m_string = rhs.m_string;
     return *this;
   }
@@ -170,7 +170,7 @@ public:
   ///     @li \b true if this object is equal to \a rhs.
   ///     @li \b false if this object is not equal to \a rhs.
   //------------------------------------------------------------------
-  bool operator==(const ConstString &rhs) const {
+  bool operator==(ConstString rhs) const {
     // We can do a pointer compare to compare these strings since they must
     // come from the same pool in order to be equal.
     return m_string == rhs.m_string;
@@ -190,11 +190,11 @@ public:
   ///     @li \b true if this object is not equal to \a rhs.
   ///     @li \b false if this object is equal to \a rhs.
   //------------------------------------------------------------------
-  bool operator!=(const ConstString &rhs) const {
+  bool operator!=(ConstString rhs) const {
     return m_string != rhs.m_string;
   }
 
-  bool operator<(const ConstString &rhs) const;
+  bool operator<(ConstString rhs) const;
 
   //------------------------------------------------------------------
   /// Get the string value as a C string.
@@ -279,7 +279,7 @@ public:
   ///     @li \b true if this object is equal to \a rhs.
   ///     @li \b false if this object is not equal to \a rhs.
   //------------------------------------------------------------------
-  static bool Equals(const ConstString &lhs, const ConstString &rhs,
+  static bool Equals(ConstString lhs, ConstString rhs,
                      const bool case_sensitive = true);
 
   //------------------------------------------------------------------
@@ -308,7 +308,7 @@ public:
   ///     @li 0 if lhs == rhs
   ///     @li 1 if lhs > rhs
   //------------------------------------------------------------------
-  static int Compare(const ConstString &lhs, const ConstString &rhs,
+  static int Compare(ConstString lhs, ConstString rhs,
                      const bool case_sensitive = true);
 
   //------------------------------------------------------------------
@@ -388,7 +388,7 @@ public:
   ///     soon to be uniqued version of \a demangled.
   //------------------------------------------------------------------
   void SetStringWithMangledCounterpart(llvm::StringRef demangled,
-                                       const ConstString &mangled);
+                                       ConstString mangled);
 
   //------------------------------------------------------------------
   /// Retrieve the mangled or demangled counterpart for a mangled or demangled
@@ -475,7 +475,7 @@ protected:
 //------------------------------------------------------------------
 /// Stream the string value \a str to the stream \a s
 //------------------------------------------------------------------
-Stream &operator<<(Stream &s, const ConstString &str);
+Stream &operator<<(Stream &s, ConstString str);
 
 } // namespace lldb_private
 
index dc95da609ad28e5929420a5daa3fad28e66487c9..c97b26f6e7545901ce20f2b12ed04ce1d903b87d 100644 (file)
@@ -45,7 +45,7 @@ public:
 
   virtual ~EventData();
 
-  virtual const ConstString &GetFlavor() const = 0;
+  virtual ConstString GetFlavor() const = 0;
 
   virtual void Dump(Stream *s) const;
 
@@ -76,7 +76,7 @@ public:
   //------------------------------------------------------------------
   // Member functions
   //------------------------------------------------------------------
-  const ConstString &GetFlavor() const override;
+  ConstString GetFlavor() const override;
 
   void Dump(Stream *s) const override;
 
@@ -99,7 +99,7 @@ public:
 
   static size_t GetByteSizeFromEvent(const Event *event_ptr);
 
-  static const ConstString &GetFlavorString();
+  static ConstString GetFlavorString();
 
 private:
   std::string m_bytes;
@@ -113,12 +113,12 @@ public:
 
   ~EventDataReceipt() override {}
 
-  static const ConstString &GetFlavorString() {
+  static ConstString GetFlavorString() {
     static ConstString g_flavor("Process::ProcessEventData");
     return g_flavor;
   }
 
-  const ConstString &GetFlavor() const override { return GetFlavorString(); }
+  ConstString GetFlavor() const override { return GetFlavorString(); }
 
   bool WaitForEventReceived(const Timeout<std::micro> &timeout = llvm::None) {
     return m_predicate.WaitForValueEqualTo(true, timeout);
@@ -153,7 +153,7 @@ public:
   //------------------------------------------------------------------
   // Member functions
   //------------------------------------------------------------------
-  const ConstString &GetFlavor() const override;
+  ConstString GetFlavor() const override;
 
   void Dump(Stream *s) const override;
 
@@ -182,7 +182,7 @@ public:
   static lldb::StructuredDataPluginSP
   GetPluginFromEvent(const Event *event_ptr);
 
-  static const ConstString &GetFlavorString();
+  static ConstString GetFlavorString();
 
 private:
   lldb::ProcessSP m_process_sp;
index 61d13c7e313e7654dceaf41ffaccf5335da82e76..206e820094f5ccb8c757567260a7e3eb94777094 100644 (file)
@@ -286,7 +286,7 @@ public:
   /// @return
   ///     A const reference to the directory string object.
   //------------------------------------------------------------------
-  const ConstString &GetDirectory() const;
+  ConstString GetDirectory() const;
 
   //------------------------------------------------------------------
   /// Filename string get accessor.
@@ -302,7 +302,7 @@ public:
   /// @return
   ///     A const reference to the filename string object.
   //------------------------------------------------------------------
-  const ConstString &GetFilename() const;
+  ConstString GetFilename() const;
 
   //------------------------------------------------------------------
   /// Returns true if the filespec represents an implementation source file
index d3ce82fecd2329bdf51d2d0352e8f175115557ac..5abc01c7d4c2ec6121fd059c0d935849604eea23 100644 (file)
@@ -115,7 +115,8 @@ public:
                                 llvm::ArrayRef<const char *> categories,
                                 llvm::raw_ostream &error_stream);
 
-  static bool ListChannelCategories(llvm::StringRef channel, llvm::raw_ostream &stream);
+  static bool ListChannelCategories(llvm::StringRef channel,
+                                    llvm::raw_ostream &stream);
 
   static void DisableAllLogChannels();
 
index 703b4faf8d8b6631f6984aac487adbcb5ea31e24..c8194e906d931e095ab702e3e82b2d46663904bc 100644 (file)
@@ -434,7 +434,7 @@ SBTypeEnumMemberList SBType::GetEnumMembers() {
     if (this_type.IsValid()) {
       this_type.ForEachEnumerator([&sb_enum_member_list](
                                       const CompilerType &integer_type,
-                                      const ConstString &name,
+                                      ConstString name,
                                       const llvm::APSInt &value) -> bool {
         SBTypeEnumMember enum_member(
             lldb::TypeEnumMemberImplSP(new TypeEnumMemberImpl(
index 1232b6e21e9502967863f5363f8e627d974737c2..d6cbe3ff86ead45c6778c62a8a48812069ab3444 100644 (file)
@@ -35,7 +35,7 @@ using namespace lldb;
 using namespace lldb_private;
 using namespace llvm;
 
-const ConstString &Breakpoint::GetEventIdentifier() {
+ConstString Breakpoint::GetEventIdentifier() {
   static ConstString g_identifier("event-identifier.breakpoint.changed");
   return g_identifier;
 }
@@ -972,7 +972,7 @@ void Breakpoint::GetResolverDescription(Stream *s) {
     m_resolver_sp->GetDescription(s);
 }
 
-bool Breakpoint::GetMatchingFileLine(const ConstString &filename,
+bool Breakpoint::GetMatchingFileLine(ConstString filename,
                                      uint32_t line_number,
                                      BreakpointLocationCollection &loc_coll) {
   // TODO: To be correct, this method needs to fill the breakpoint location
@@ -1048,12 +1048,12 @@ Breakpoint::BreakpointEventData::BreakpointEventData(
 
 Breakpoint::BreakpointEventData::~BreakpointEventData() = default;
 
-const ConstString &Breakpoint::BreakpointEventData::GetFlavorString() {
+ConstString Breakpoint::BreakpointEventData::GetFlavorString() {
   static ConstString g_flavor("Breakpoint::BreakpointEventData");
   return g_flavor;
 }
 
-const ConstString &Breakpoint::BreakpointEventData::GetFlavor() const {
+ConstString Breakpoint::BreakpointEventData::GetFlavor() const {
   return BreakpointEventData::GetFlavorString();
 }
 
index 46d877c2f0d3b1a5dedf4dc7ad9a0a8fa02baaa7..b822e3b9d96633b073195831488adb5c9bd2355d 100644 (file)
@@ -28,7 +28,7 @@ const Flags::ValueType BreakpointName::Permissions::permissions_mask
       (0x5u)
 };
 
-BreakpointName::BreakpointName(const ConstString &name, const Breakpoint &bkpt,
+BreakpointName::BreakpointName(ConstString name, const Breakpoint &bkpt,
                  const char *help) :
       m_name(name), m_options(bkpt.GetOptions())
 {
index 7c9fa8b77fabcd1939734939d825900f9a807916..0ffa5029b0de3f0368df2f9d107be9987743fdbb 100644 (file)
@@ -217,7 +217,7 @@ StructuredData::ObjectSP BreakpointResolverName::SerializeToStructuredData() {
   return WrapOptionsDict(options_dict_sp);
 }
 
-void BreakpointResolverName::AddNameLookup(const ConstString &name,
+void BreakpointResolverName::AddNameLookup(ConstString name,
                                            FunctionNameType name_type_mask) {
   ObjCLanguage::MethodName objc_method(name.GetCString(), false);
   if (objc_method.IsValid(false)) {
index 6481ad1a7143d7d8df76e5db2b0ad93d70d066c0..e8a926527d24bdfd71364f4272191a4960292fe0 100644 (file)
@@ -325,12 +325,12 @@ Watchpoint::WatchpointEventData::WatchpointEventData(
 
 Watchpoint::WatchpointEventData::~WatchpointEventData() = default;
 
-const ConstString &Watchpoint::WatchpointEventData::GetFlavorString() {
+ConstString Watchpoint::WatchpointEventData::GetFlavorString() {
   static ConstString g_flavor("Watchpoint::WatchpointEventData");
   return g_flavor;
 }
 
-const ConstString &Watchpoint::WatchpointEventData::GetFlavor() const {
+ConstString Watchpoint::WatchpointEventData::GetFlavor() const {
   return WatchpointEventData::GetFlavorString();
 }
 
index cc08e472b485b192bbdbbfa5ebdfae6b1a184e94..abcf6013798fa445cb2d4780d5eb6449afced517 100644 (file)
@@ -194,7 +194,7 @@ protected:
           continue;
 
         // Print a new header if the module changed.
-        const ConstString &module_file_name =
+        ConstString module_file_name =
             module->GetFileSpec().GetFilename();
         assert(module_file_name);
         if (module_file_name != last_module_file_name) {
@@ -240,8 +240,8 @@ protected:
 
         // Dump all matching lines at or above start_line for the file in the
         // CU.
-        const ConstString &file_spec_name = file_spec.GetFilename();
-        const ConstString &module_file_name =
+        ConstString file_spec_name = file_spec.GetFilename();
+        ConstString module_file_name =
             module->GetFileSpec().GetFilename();
         bool cu_header_printed = false;
         uint32_t line = start_line;
@@ -780,7 +780,7 @@ protected:
     ConstString function;
     LineEntry line_entry;
 
-    SourceInfo(const ConstString &name, const LineEntry &line_entry)
+    SourceInfo(ConstString name, const LineEntry &line_entry)
         : function(name), line_entry(line_entry) {}
 
     SourceInfo() : function(), line_entry() {}
@@ -901,7 +901,7 @@ protected:
   // these somewhere, there should probably be a module-filter-list that can be
   // passed to the various ModuleList::Find* calls, which would either be a
   // vector of string names or a ModuleSpecList.
-  size_t FindMatchingFunctions(Target *target, const ConstString &name,
+  size_t FindMatchingFunctions(Target *target, ConstString name,
                                SymbolContextList &sc_list) {
     // Displaying the source for a symbol:
     bool include_inlines = true;
@@ -934,7 +934,7 @@ protected:
     return num_matches;
   }
 
-  size_t FindMatchingFunctionSymbols(Target *target, const ConstString &name,
+  size_t FindMatchingFunctionSymbols(Target *target, ConstString name,
                                      SymbolContextList &sc_list) {
     size_t num_matches = 0;
     const size_t num_modules = m_options.modules.size();
index 64ed459678447f4758fead623fe597916e09c74b..887d2b85ec4f82b6e53a7d3f1078bd67b824c816 100644 (file)
@@ -52,7 +52,7 @@ public:
   std::string m_category;
 
   ScriptAddOptions(const TypeSummaryImpl::Flags &flags, bool regx,
-                   const ConstString &name, std::string catg)
+                   ConstString name, std::string catg)
       : m_flags(flags), m_regex(regx), m_name(name), m_category(catg) {}
 
   typedef std::shared_ptr<ScriptAddOptions> SharedPointer;
index 00b88a71685fade085a20b0a5436634057b106e3..c170274da5e52b4f885ce5a37647f01b9f569b10 100644 (file)
@@ -711,7 +711,7 @@ void Debugger::Destroy(DebuggerSP &debugger_sp) {
 }
 
 DebuggerSP
-Debugger::FindDebuggerWithInstanceName(const ConstString &instance_name) {
+Debugger::FindDebuggerWithInstanceName(ConstString instance_name) {
   DebuggerSP debugger_sp;
   if (g_debugger_list_ptr && g_debugger_list_mutex_ptr) {
     std::lock_guard<std::recursive_mutex> guard(*g_debugger_list_mutex_ptr);
index 5f037d800efc1e1f541ea84127a1fc701dedec8d..f5cfcf2ade1c10a494c0a25865ea6795639455fd 100644 (file)
@@ -161,7 +161,7 @@ size_t Disassembler::Disassemble(Debugger &debugger, const ArchSpec &arch,
 bool Disassembler::Disassemble(Debugger &debugger, const ArchSpec &arch,
                                const char *plugin_name, const char *flavor,
                                const ExecutionContext &exe_ctx,
-                               const ConstString &name, Module *module,
+                               ConstString name, Module *module,
                                uint32_t num_instructions,
                                bool mixed_source_and_assembly,
                                uint32_t num_mixed_context_lines,
index 5ab3fdf949d898ed5ad0476cd35df8e96e9c059c..e3b3721e4ea5fe03b736cbd95b15b0e49a7c0fbf 100644 (file)
@@ -72,7 +72,7 @@ static inline bool cstring_is_mangled(const char *s) {
   return cstring_mangling_scheme(s) != Mangled::eManglingSchemeNone;
 }
 
-static const ConstString &
+static ConstString 
 get_demangled_name_without_arguments(ConstString mangled,
                                      ConstString demangled) {
   // This pair is <mangled name, demangled name without function arguments>
@@ -133,7 +133,7 @@ Mangled::Mangled() : m_mangled(), m_demangled() {}
 // Constructor with an optional string and a boolean indicating if it is the
 // mangled version.
 //----------------------------------------------------------------------
-Mangled::Mangled(const ConstString &s, bool mangled)
+Mangled::Mangled(ConstString s, bool mangled)
     : m_mangled(), m_demangled() {
   if (s)
     SetValue(s, mangled);
@@ -144,7 +144,7 @@ Mangled::Mangled(llvm::StringRef name, bool is_mangled) {
     SetValue(ConstString(name), is_mangled);
 }
 
-Mangled::Mangled(const ConstString &s) : m_mangled(), m_demangled() {
+Mangled::Mangled(ConstString s) : m_mangled(), m_demangled() {
   if (s)
     SetValue(s);
 }
@@ -202,7 +202,7 @@ int Mangled::Compare(const Mangled &a, const Mangled &b) {
 // Set the string value in this objects. If "mangled" is true, then the mangled
 // named is set with the new value in "s", else the demangled name is set.
 //----------------------------------------------------------------------
-void Mangled::SetValue(const ConstString &s, bool mangled) {
+void Mangled::SetValue(ConstString s, bool mangled) {
   if (s) {
     if (mangled) {
       m_demangled.Clear();
@@ -217,7 +217,7 @@ void Mangled::SetValue(const ConstString &s, bool mangled) {
   }
 }
 
-void Mangled::SetValue(const ConstString &name) {
+void Mangled::SetValue(ConstString name) {
   if (name) {
     if (cstring_is_mangled(name.GetCString())) {
       m_demangled.Clear();
@@ -362,7 +362,7 @@ bool Mangled::DemangleWithRichManglingInfo(
 // name. The result is cached and will be kept until a new string value is
 // supplied to this object, or until the end of the object's lifetime.
 //----------------------------------------------------------------------
-const ConstString &
+ConstString 
 Mangled::GetDemangledName(lldb::LanguageType language) const {
   // Check to make sure we have a valid mangled name and that we haven't
   // already decoded our mangled name.
@@ -514,7 +514,7 @@ Stream &operator<<(Stream &s, const Mangled &obj) {
   if (obj.GetMangledName())
     s << "mangled = '" << obj.GetMangledName() << "'";
 
-  const ConstString &demangled =
+  ConstString demangled =
       obj.GetDemangledName(lldb::eLanguageTypeUnknown);
   if (demangled)
     s << ", demangled = '" << demangled << '\'';
index 8ff01cb2560d6fd5e9a40fc54c8e4ac032f64f05..262e15dbcc7459fb3db4fc76c553c6a2b141962b 100644 (file)
@@ -598,7 +598,7 @@ uint32_t Module::ResolveSymbolContextsForFileSpec(
   return sc_list.GetSize() - initial_count;
 }
 
-size_t Module::FindGlobalVariables(const ConstString &name,
+size_t Module::FindGlobalVariables(ConstString name,
                                    const CompilerDeclContext *parent_decl_ctx,
                                    size_t max_matches,
                                    VariableList &variables) {
@@ -638,7 +638,7 @@ size_t Module::FindCompileUnits(const FileSpec &path, bool append,
   return sc_list.GetSize() - start_size;
 }
 
-Module::LookupInfo::LookupInfo(const ConstString &name,
+Module::LookupInfo::LookupInfo(ConstString name,
                                FunctionNameType name_type_mask,
                                LanguageType language)
     : m_name(name), m_lookup_name(), m_language(language),
@@ -798,7 +798,7 @@ void Module::LookupInfo::Prune(SymbolContextList &sc_list,
   }
 }
 
-size_t Module::FindFunctions(const ConstString &name,
+size_t Module::FindFunctions(ConstString name,
                              const CompilerDeclContext *parent_decl_ctx,
                              FunctionNameType name_type_mask,
                              bool include_symbols, bool include_inlines,
@@ -946,7 +946,7 @@ void Module::FindAddressesForLine(const lldb::TargetSP target_sp,
 }
 
 size_t Module::FindTypes_Impl(
-    const ConstString &name, const CompilerDeclContext *parent_decl_ctx,
+    ConstString name, const CompilerDeclContext *parent_decl_ctx,
     bool append, size_t max_matches,
     llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
     TypeMap &types) {
@@ -959,7 +959,7 @@ size_t Module::FindTypes_Impl(
   return 0;
 }
 
-size_t Module::FindTypesInNamespace(const ConstString &type_name,
+size_t Module::FindTypesInNamespace(ConstString type_name,
                                     const CompilerDeclContext *parent_decl_ctx,
                                     size_t max_matches, TypeList &type_list) {
   const bool append = true;
@@ -977,7 +977,7 @@ size_t Module::FindTypesInNamespace(const ConstString &type_name,
 }
 
 lldb::TypeSP Module::FindFirstType(const SymbolContext &sc,
-                                   const ConstString &name, bool exact_match) {
+                                   ConstString name, bool exact_match) {
   TypeList type_list;
   llvm::DenseSet<lldb_private::SymbolFile *> searched_symbol_files;
   const size_t num_matches =
@@ -988,7 +988,7 @@ lldb::TypeSP Module::FindFirstType(const SymbolContext &sc,
 }
 
 size_t Module::FindTypes(
-    const ConstString &name, bool exact_match, size_t max_matches,
+    ConstString name, bool exact_match, size_t max_matches,
     llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
     TypeList &types) {
   size_t num_matches = 0;
@@ -1063,7 +1063,7 @@ SymbolVendor *Module::GetSymbolVendor(bool can_create,
 }
 
 void Module::SetFileSpecAndObjectName(const FileSpec &file,
-                                      const ConstString &object_name) {
+                                      ConstString object_name) {
   // Container objects whose paths do not specify a file directly can call this
   // function to correct the file and object names.
   m_file = file;
@@ -1246,7 +1246,7 @@ TypeList *Module::GetTypeList() {
   return nullptr;
 }
 
-const ConstString &Module::GetObjectName() const { return m_object_name; }
+ConstString Module::GetObjectName() const { return m_object_name; }
 
 ObjectFile *Module::GetObjectFile() {
   if (!m_did_load_objfile.load()) {
@@ -1306,7 +1306,7 @@ SectionList *Module::GetUnifiedSectionList() {
   return m_sections_up.get();
 }
 
-const Symbol *Module::FindFirstSymbolWithNameAndType(const ConstString &name,
+const Symbol *Module::FindFirstSymbolWithNameAndType(ConstString name,
                                                      SymbolType symbol_type) {
   static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
   Timer scoped_timer(
@@ -1339,7 +1339,7 @@ void Module::SymbolIndicesToSymbolContextList(
   }
 }
 
-size_t Module::FindFunctionSymbols(const ConstString &name,
+size_t Module::FindFunctionSymbols(ConstString name,
                                    uint32_t name_type_mask,
                                    SymbolContextList &sc_list) {
   static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
@@ -1355,7 +1355,7 @@ size_t Module::FindFunctionSymbols(const ConstString &name,
   return 0;
 }
 
-size_t Module::FindSymbolsWithNameAndType(const ConstString &name,
+size_t Module::FindSymbolsWithNameAndType(ConstString name,
                                           SymbolType symbol_type,
                                           SymbolContextList &sc_list) {
   // No need to protect this call using m_mutex all other method calls are
@@ -1625,7 +1625,7 @@ bool Module::MatchesModuleSpec(const ModuleSpec &module_ref) {
       return false;
   }
 
-  const ConstString &object_name = module_ref.GetObjectName();
+  ConstString object_name = module_ref.GetObjectName();
   if (object_name) {
     if (object_name != GetObjectName())
       return false;
index 74b9af3e10cd85aa6551c0c96d0d2711b3cb9564..8740bd0f40acbbca6f7292a00d60aacf3af6ea3c 100644 (file)
@@ -344,7 +344,7 @@ ModuleSP ModuleList::GetModuleAtIndexUnlocked(size_t idx) const {
   return module_sp;
 }
 
-size_t ModuleList::FindFunctions(const ConstString &name,
+size_t ModuleList::FindFunctions(ConstString name,
                                  FunctionNameType name_type_mask,
                                  bool include_symbols, bool include_inlines,
                                  bool append,
@@ -380,7 +380,7 @@ size_t ModuleList::FindFunctions(const ConstString &name,
   return sc_list.GetSize() - old_size;
 }
 
-size_t ModuleList::FindFunctionSymbols(const ConstString &name,
+size_t ModuleList::FindFunctionSymbols(ConstString name,
                                        lldb::FunctionNameType name_type_mask,
                                        SymbolContextList &sc_list) {
   const size_t old_size = sc_list.GetSize();
@@ -439,7 +439,7 @@ size_t ModuleList::FindCompileUnits(const FileSpec &path, bool append,
   return sc_list.GetSize();
 }
 
-size_t ModuleList::FindGlobalVariables(const ConstString &name,
+size_t ModuleList::FindGlobalVariables(ConstString name,
                                        size_t max_matches,
                                        VariableList &variable_list) const {
   size_t initial_size = variable_list.GetSize();
@@ -463,7 +463,7 @@ size_t ModuleList::FindGlobalVariables(const RegularExpression &regex,
   return variable_list.GetSize() - initial_size;
 }
 
-size_t ModuleList::FindSymbolsWithNameAndType(const ConstString &name,
+size_t ModuleList::FindSymbolsWithNameAndType(ConstString name,
                                               SymbolType symbol_type,
                                               SymbolContextList &sc_list,
                                               bool append) const {
@@ -542,7 +542,7 @@ ModuleSP ModuleList::FindModule(const UUID &uuid) const {
 }
 
 size_t
-ModuleList::FindTypes(Module *search_first, const ConstString &name,
+ModuleList::FindTypes(Module *search_first, ConstString name,
                       bool name_is_fully_qualified, size_t max_matches,
                       llvm::DenseSet<SymbolFile *> &searched_symbol_files,
                       TypeList &types) const {
index 8a03ca1fae0ad55be550bff5e178bc0f49d97885..07121dacfd226b7d771a575634bb6c9dc81f2590 100644 (file)
@@ -219,7 +219,7 @@ static ABIInstances &GetABIInstances() {
   return g_instances;
 }
 
-bool PluginManager::RegisterPlugin(const ConstString &name,
+bool PluginManager::RegisterPlugin(ConstString name,
                                    const char *description,
                                    ABICreateInstance create_callback) {
   if (create_callback) {
@@ -261,7 +261,7 @@ ABICreateInstance PluginManager::GetABICreateCallbackAtIndex(uint32_t idx) {
 }
 
 ABICreateInstance
-PluginManager::GetABICreateCallbackForPluginName(const ConstString &name) {
+PluginManager::GetABICreateCallbackForPluginName(ConstString name) {
   if (name) {
     std::lock_guard<std::recursive_mutex> guard(GetABIInstancesMutex());
     ABIInstances &instances = GetABIInstances();
@@ -295,7 +295,7 @@ static ArchitectureInstances &GetArchitectureInstances() {
   return g_instances;
 }
 
-void PluginManager::RegisterPlugin(const ConstString &name,
+void PluginManager::RegisterPlugin(ConstString name,
                                    llvm::StringRef description,
                                    ArchitectureCreateInstance create_callback) {
   std::lock_guard<std::mutex> guard(GetArchitectureMutex());
@@ -348,7 +348,7 @@ static DisassemblerInstances &GetDisassemblerInstances() {
   return g_instances;
 }
 
-bool PluginManager::RegisterPlugin(const ConstString &name,
+bool PluginManager::RegisterPlugin(ConstString name,
                                    const char *description,
                                    DisassemblerCreateInstance create_callback) {
   if (create_callback) {
@@ -393,7 +393,7 @@ PluginManager::GetDisassemblerCreateCallbackAtIndex(uint32_t idx) {
 
 DisassemblerCreateInstance
 PluginManager::GetDisassemblerCreateCallbackForPluginName(
-    const ConstString &name) {
+    ConstString name) {
   if (name) {
     std::lock_guard<std::recursive_mutex> guard(GetDisassemblerMutex());
     DisassemblerInstances &instances = GetDisassemblerInstances();
@@ -433,7 +433,7 @@ static DynamicLoaderInstances &GetDynamicLoaderInstances() {
 }
 
 bool PluginManager::RegisterPlugin(
-    const ConstString &name, const char *description,
+    ConstString name, const char *description,
     DynamicLoaderCreateInstance create_callback,
     DebuggerInitializeCallback debugger_init_callback) {
   if (create_callback) {
@@ -478,7 +478,7 @@ PluginManager::GetDynamicLoaderCreateCallbackAtIndex(uint32_t idx) {
 
 DynamicLoaderCreateInstance
 PluginManager::GetDynamicLoaderCreateCallbackForPluginName(
-    const ConstString &name) {
+    ConstString name) {
   if (name) {
     std::lock_guard<std::recursive_mutex> guard(GetDynamicLoaderMutex());
     DynamicLoaderInstances &instances = GetDynamicLoaderInstances();
@@ -518,7 +518,7 @@ static JITLoaderInstances &GetJITLoaderInstances() {
 }
 
 bool PluginManager::RegisterPlugin(
-    const ConstString &name, const char *description,
+    ConstString name, const char *description,
     JITLoaderCreateInstance create_callback,
     DebuggerInitializeCallback debugger_init_callback) {
   if (create_callback) {
@@ -561,7 +561,7 @@ PluginManager::GetJITLoaderCreateCallbackAtIndex(uint32_t idx) {
 }
 
 JITLoaderCreateInstance PluginManager::GetJITLoaderCreateCallbackForPluginName(
-    const ConstString &name) {
+    ConstString name) {
   if (name) {
     std::lock_guard<std::recursive_mutex> guard(GetJITLoaderMutex());
     JITLoaderInstances &instances = GetJITLoaderInstances();
@@ -599,7 +599,7 @@ static EmulateInstructionInstances &GetEmulateInstructionInstances() {
 }
 
 bool PluginManager::RegisterPlugin(
-    const ConstString &name, const char *description,
+    ConstString name, const char *description,
     EmulateInstructionCreateInstance create_callback) {
   if (create_callback) {
     EmulateInstructionInstance instance;
@@ -642,7 +642,7 @@ PluginManager::GetEmulateInstructionCreateCallbackAtIndex(uint32_t idx) {
 
 EmulateInstructionCreateInstance
 PluginManager::GetEmulateInstructionCreateCallbackForPluginName(
-    const ConstString &name) {
+    ConstString name) {
   if (name) {
     std::lock_guard<std::recursive_mutex> guard(GetEmulateInstructionMutex());
     EmulateInstructionInstances &instances = GetEmulateInstructionInstances();
@@ -682,7 +682,7 @@ static OperatingSystemInstances &GetOperatingSystemInstances() {
 }
 
 bool PluginManager::RegisterPlugin(
-    const ConstString &name, const char *description,
+    ConstString name, const char *description,
     OperatingSystemCreateInstance create_callback,
     DebuggerInitializeCallback debugger_init_callback) {
   if (create_callback) {
@@ -727,7 +727,7 @@ PluginManager::GetOperatingSystemCreateCallbackAtIndex(uint32_t idx) {
 
 OperatingSystemCreateInstance
 PluginManager::GetOperatingSystemCreateCallbackForPluginName(
-    const ConstString &name) {
+    ConstString name) {
   if (name) {
     std::lock_guard<std::recursive_mutex> guard(GetOperatingSystemMutex());
     OperatingSystemInstances &instances = GetOperatingSystemInstances();
@@ -763,7 +763,7 @@ static LanguageInstances &GetLanguageInstances() {
   return g_instances;
 }
 
-bool PluginManager::RegisterPlugin(const ConstString &name,
+bool PluginManager::RegisterPlugin(ConstString name,
                                    const char *description,
                                    LanguageCreateInstance create_callback) {
   if (create_callback) {
@@ -805,7 +805,7 @@ PluginManager::GetLanguageCreateCallbackAtIndex(uint32_t idx) {
 }
 
 LanguageCreateInstance
-PluginManager::GetLanguageCreateCallbackForPluginName(const ConstString &name) {
+PluginManager::GetLanguageCreateCallbackForPluginName(ConstString name) {
   if (name) {
     std::lock_guard<std::recursive_mutex> guard(GetLanguageMutex());
     LanguageInstances &instances = GetLanguageInstances();
@@ -843,7 +843,7 @@ static LanguageRuntimeInstances &GetLanguageRuntimeInstances() {
 }
 
 bool PluginManager::RegisterPlugin(
-    const ConstString &name, const char *description,
+    ConstString name, const char *description,
     LanguageRuntimeCreateInstance create_callback,
     LanguageRuntimeGetCommandObject command_callback) {
   if (create_callback) {
@@ -897,7 +897,7 @@ PluginManager::GetLanguageRuntimeGetCommandObjectAtIndex(uint32_t idx) {
 
 LanguageRuntimeCreateInstance
 PluginManager::GetLanguageRuntimeCreateCallbackForPluginName(
-    const ConstString &name) {
+    ConstString name) {
   if (name) {
     std::lock_guard<std::recursive_mutex> guard(GetLanguageRuntimeMutex());
     LanguageRuntimeInstances &instances = GetLanguageRuntimeInstances();
@@ -934,7 +934,7 @@ static SystemRuntimeInstances &GetSystemRuntimeInstances() {
 }
 
 bool PluginManager::RegisterPlugin(
-    const ConstString &name, const char *description,
+    ConstString name, const char *description,
     SystemRuntimeCreateInstance create_callback) {
   if (create_callback) {
     SystemRuntimeInstance instance;
@@ -977,7 +977,7 @@ PluginManager::GetSystemRuntimeCreateCallbackAtIndex(uint32_t idx) {
 
 SystemRuntimeCreateInstance
 PluginManager::GetSystemRuntimeCreateCallbackForPluginName(
-    const ConstString &name) {
+    ConstString name) {
   if (name) {
     std::lock_guard<std::recursive_mutex> guard(GetSystemRuntimeMutex());
     SystemRuntimeInstances &instances = GetSystemRuntimeInstances();
@@ -1020,7 +1020,7 @@ static ObjectFileInstances &GetObjectFileInstances() {
 }
 
 bool PluginManager::RegisterPlugin(
-    const ConstString &name, const char *description,
+    ConstString name, const char *description,
     ObjectFileCreateInstance create_callback,
     ObjectFileCreateMemoryInstance create_memory_callback,
     ObjectFileGetModuleSpecifications get_module_specifications,
@@ -1087,7 +1087,7 @@ PluginManager::GetObjectFileGetModuleSpecificationsCallbackAtIndex(
 
 ObjectFileCreateInstance
 PluginManager::GetObjectFileCreateCallbackForPluginName(
-    const ConstString &name) {
+    ConstString name) {
   if (name) {
     std::lock_guard<std::recursive_mutex> guard(GetObjectFileMutex());
     ObjectFileInstances &instances = GetObjectFileInstances();
@@ -1103,7 +1103,7 @@ PluginManager::GetObjectFileCreateCallbackForPluginName(
 
 ObjectFileCreateMemoryInstance
 PluginManager::GetObjectFileCreateMemoryCallbackForPluginName(
-    const ConstString &name) {
+    ConstString name) {
   if (name) {
     std::lock_guard<std::recursive_mutex> guard(GetObjectFileMutex());
     ObjectFileInstances &instances = GetObjectFileInstances();
@@ -1159,7 +1159,7 @@ static ObjectContainerInstances &GetObjectContainerInstances() {
 }
 
 bool PluginManager::RegisterPlugin(
-    const ConstString &name, const char *description,
+    ConstString name, const char *description,
     ObjectContainerCreateInstance create_callback,
     ObjectFileGetModuleSpecifications get_module_specifications) {
   if (create_callback) {
@@ -1204,7 +1204,7 @@ PluginManager::GetObjectContainerCreateCallbackAtIndex(uint32_t idx) {
 
 ObjectContainerCreateInstance
 PluginManager::GetObjectContainerCreateCallbackForPluginName(
-    const ConstString &name) {
+    ConstString name) {
   if (name) {
     std::lock_guard<std::recursive_mutex> guard(GetObjectContainerMutex());
     ObjectContainerInstances &instances = GetObjectContainerInstances();
@@ -1254,7 +1254,7 @@ static PlatformInstances &GetPlatformInstances() {
 }
 
 bool PluginManager::RegisterPlugin(
-    const ConstString &name, const char *description,
+    ConstString name, const char *description,
     PlatformCreateInstance create_callback,
     DebuggerInitializeCallback debugger_init_callback) {
   if (create_callback) {
@@ -1315,7 +1315,7 @@ PluginManager::GetPlatformCreateCallbackAtIndex(uint32_t idx) {
 }
 
 PlatformCreateInstance
-PluginManager::GetPlatformCreateCallbackForPluginName(const ConstString &name) {
+PluginManager::GetPlatformCreateCallbackForPluginName(ConstString name) {
   if (name) {
     std::lock_guard<std::recursive_mutex> guard(GetPlatformInstancesMutex());
     PlatformInstances &instances = GetPlatformInstances();
@@ -1373,7 +1373,7 @@ static ProcessInstances &GetProcessInstances() {
 }
 
 bool PluginManager::RegisterPlugin(
-    const ConstString &name, const char *description,
+    ConstString name, const char *description,
     ProcessCreateInstance create_callback,
     DebuggerInitializeCallback debugger_init_callback) {
   if (create_callback) {
@@ -1432,7 +1432,7 @@ PluginManager::GetProcessCreateCallbackAtIndex(uint32_t idx) {
 }
 
 ProcessCreateInstance
-PluginManager::GetProcessCreateCallbackForPluginName(const ConstString &name) {
+PluginManager::GetProcessCreateCallbackForPluginName(ConstString name) {
   if (name) {
     std::lock_guard<std::recursive_mutex> guard(GetProcessMutex());
     ProcessInstances &instances = GetProcessInstances();
@@ -1472,7 +1472,7 @@ static ScriptInterpreterInstances &GetScriptInterpreterInstances() {
 }
 
 bool PluginManager::RegisterPlugin(
-    const ConstString &name, const char *description,
+    ConstString name, const char *description,
     lldb::ScriptLanguage script_language,
     ScriptInterpreterCreateInstance create_callback) {
   if (!create_callback)
@@ -1568,7 +1568,7 @@ static StructuredDataPluginInstances &GetStructuredDataPluginInstances() {
 }
 
 bool PluginManager::RegisterPlugin(
-    const ConstString &name, const char *description,
+    ConstString name, const char *description,
     StructuredDataPluginCreateInstance create_callback,
     DebuggerInitializeCallback debugger_init_callback,
     StructuredDataFilterLaunchInfo filter_callback) {
@@ -1616,7 +1616,7 @@ PluginManager::GetStructuredDataPluginCreateCallbackAtIndex(uint32_t idx) {
 
 StructuredDataPluginCreateInstance
 PluginManager::GetStructuredDataPluginCreateCallbackForPluginName(
-    const ConstString &name) {
+    ConstString name) {
   if (name) {
     std::lock_guard<std::recursive_mutex> guard(GetStructuredDataPluginMutex());
     StructuredDataPluginInstances &instances =
@@ -1671,7 +1671,7 @@ static SymbolFileInstances &GetSymbolFileInstances() {
 }
 
 bool PluginManager::RegisterPlugin(
-    const ConstString &name, const char *description,
+    ConstString name, const char *description,
     SymbolFileCreateInstance create_callback,
     DebuggerInitializeCallback debugger_init_callback) {
   if (create_callback) {
@@ -1715,7 +1715,7 @@ PluginManager::GetSymbolFileCreateCallbackAtIndex(uint32_t idx) {
 
 SymbolFileCreateInstance
 PluginManager::GetSymbolFileCreateCallbackForPluginName(
-    const ConstString &name) {
+    ConstString name) {
   if (name) {
     std::lock_guard<std::recursive_mutex> guard(GetSymbolFileMutex());
     SymbolFileInstances &instances = GetSymbolFileInstances();
@@ -1751,7 +1751,7 @@ static SymbolVendorInstances &GetSymbolVendorInstances() {
   return g_instances;
 }
 
-bool PluginManager::RegisterPlugin(const ConstString &name,
+bool PluginManager::RegisterPlugin(ConstString name,
                                    const char *description,
                                    SymbolVendorCreateInstance create_callback) {
   if (create_callback) {
@@ -1795,7 +1795,7 @@ PluginManager::GetSymbolVendorCreateCallbackAtIndex(uint32_t idx) {
 
 SymbolVendorCreateInstance
 PluginManager::GetSymbolVendorCreateCallbackForPluginName(
-    const ConstString &name) {
+    ConstString name) {
   if (name) {
     std::lock_guard<std::recursive_mutex> guard(GetSymbolVendorMutex());
     SymbolVendorInstances &instances = GetSymbolVendorInstances();
@@ -1832,7 +1832,7 @@ static UnwindAssemblyInstances &GetUnwindAssemblyInstances() {
 }
 
 bool PluginManager::RegisterPlugin(
-    const ConstString &name, const char *description,
+    ConstString name, const char *description,
     UnwindAssemblyCreateInstance create_callback) {
   if (create_callback) {
     UnwindAssemblyInstance instance;
@@ -1875,7 +1875,7 @@ PluginManager::GetUnwindAssemblyCreateCallbackAtIndex(uint32_t idx) {
 
 UnwindAssemblyCreateInstance
 PluginManager::GetUnwindAssemblyCreateCallbackForPluginName(
-    const ConstString &name) {
+    ConstString name) {
   if (name) {
     std::lock_guard<std::recursive_mutex> guard(GetUnwindAssemblyMutex());
     UnwindAssemblyInstances &instances = GetUnwindAssemblyInstances();
@@ -1912,7 +1912,7 @@ static MemoryHistoryInstances &GetMemoryHistoryInstances() {
 }
 
 bool PluginManager::RegisterPlugin(
-    const ConstString &name, const char *description,
+    ConstString name, const char *description,
     MemoryHistoryCreateInstance create_callback) {
   if (create_callback) {
     MemoryHistoryInstance instance;
@@ -1955,7 +1955,7 @@ PluginManager::GetMemoryHistoryCreateCallbackAtIndex(uint32_t idx) {
 
 MemoryHistoryCreateInstance
 PluginManager::GetMemoryHistoryCreateCallbackForPluginName(
-    const ConstString &name) {
+    ConstString name) {
   if (name) {
     std::lock_guard<std::recursive_mutex> guard(GetMemoryHistoryMutex());
     MemoryHistoryInstances &instances = GetMemoryHistoryInstances();
@@ -1995,7 +1995,7 @@ static InstrumentationRuntimeInstances &GetInstrumentationRuntimeInstances() {
 }
 
 bool PluginManager::RegisterPlugin(
-    const ConstString &name, const char *description,
+    ConstString name, const char *description,
     InstrumentationRuntimeCreateInstance create_callback,
     InstrumentationRuntimeGetType get_type_callback) {
   if (create_callback) {
@@ -2054,7 +2054,7 @@ PluginManager::GetInstrumentationRuntimeCreateCallbackAtIndex(uint32_t idx) {
 
 InstrumentationRuntimeCreateInstance
 PluginManager::GetInstrumentationRuntimeCreateCallbackForPluginName(
-    const ConstString &name) {
+    ConstString name) {
   if (name) {
     std::lock_guard<std::recursive_mutex> guard(
         GetInstrumentationRuntimeMutex());
@@ -2093,7 +2093,7 @@ static TypeSystemInstances &GetTypeSystemInstances() {
   return g_instances;
 }
 
-bool PluginManager::RegisterPlugin(const ConstString &name,
+bool PluginManager::RegisterPlugin(ConstString name,
                                    const char *description,
                                    TypeSystemCreateInstance create_callback,
                                    TypeSystemEnumerateSupportedLanguages
@@ -2139,7 +2139,7 @@ PluginManager::GetTypeSystemCreateCallbackAtIndex(uint32_t idx) {
 
 TypeSystemCreateInstance
 PluginManager::GetTypeSystemCreateCallbackForPluginName(
-    const ConstString &name) {
+    ConstString name) {
   if (name) {
     std::lock_guard<std::recursive_mutex> guard(GetTypeSystemMutex());
     TypeSystemInstances &instances = GetTypeSystemInstances();
@@ -2165,7 +2165,7 @@ PluginManager::GetTypeSystemEnumerateSupportedLanguagesCallbackAtIndex(
 
 TypeSystemEnumerateSupportedLanguages
 PluginManager::GetTypeSystemEnumerateSupportedLanguagesCallbackForPluginName(
-    const ConstString &name) {
+    ConstString name) {
   if (name) {
     std::lock_guard<std::recursive_mutex> guard(GetTypeSystemMutex());
     TypeSystemInstances &instances = GetTypeSystemInstances();
@@ -2203,7 +2203,7 @@ static REPLInstances &GetREPLInstances() {
 }
 
 bool PluginManager::RegisterPlugin(
-    const ConstString &name, const char *description,
+    ConstString name, const char *description,
     REPLCreateInstance create_callback,
     REPLEnumerateSupportedLanguages enumerate_languages_callback) {
   if (create_callback) {
@@ -2245,7 +2245,7 @@ REPLCreateInstance PluginManager::GetREPLCreateCallbackAtIndex(uint32_t idx) {
 }
 
 REPLCreateInstance
-PluginManager::GetREPLCreateCallbackForPluginName(const ConstString &name) {
+PluginManager::GetREPLCreateCallbackForPluginName(ConstString name) {
   if (name) {
     std::lock_guard<std::recursive_mutex> guard(GetREPLMutex());
     REPLInstances &instances = GetREPLInstances();
@@ -2270,7 +2270,7 @@ PluginManager::GetREPLEnumerateSupportedLanguagesCallbackAtIndex(uint32_t idx) {
 
 REPLEnumerateSupportedLanguages
 PluginManager::GetREPLSystemEnumerateSupportedLanguagesCallbackForPluginName(
-    const ConstString &name) {
+    ConstString name) {
   if (name) {
     std::lock_guard<std::recursive_mutex> guard(GetREPLMutex());
     REPLInstances &instances = GetREPLInstances();
@@ -2367,8 +2367,8 @@ void PluginManager::DebuggerInitialize(Debugger &debugger) {
 // This will put a plugin's settings under e.g.
 // "plugin.<plugin_type_name>.<plugin_type_desc>.SETTINGNAME".
 static lldb::OptionValuePropertiesSP GetDebuggerPropertyForPlugins(
-    Debugger &debugger, const ConstString &plugin_type_name,
-    const ConstString &plugin_type_desc, bool can_create) {
+    Debugger &debugger, ConstString plugin_type_name,
+    ConstString plugin_type_desc, bool can_create) {
   lldb::OptionValuePropertiesSP parent_properties_sp(
       debugger.GetValueProperties());
   if (parent_properties_sp) {
@@ -2403,8 +2403,8 @@ static lldb::OptionValuePropertiesSP GetDebuggerPropertyForPlugins(
 // "<plugin_type_name>.plugin.<plugin_type_desc>.SETTINGNAME" and Platform
 // generic settings would be under "platform.SETTINGNAME".
 static lldb::OptionValuePropertiesSP GetDebuggerPropertyForPluginsOldStyle(
-    Debugger &debugger, const ConstString &plugin_type_name,
-    const ConstString &plugin_type_desc, bool can_create) {
+    Debugger &debugger, ConstString plugin_type_name,
+    ConstString plugin_type_desc, bool can_create) {
   static ConstString g_property_name("plugin");
   lldb::OptionValuePropertiesSP parent_properties_sp(
       debugger.GetValueProperties());
@@ -2437,12 +2437,12 @@ static lldb::OptionValuePropertiesSP GetDebuggerPropertyForPluginsOldStyle(
 namespace {
 
 typedef lldb::OptionValuePropertiesSP
-GetDebuggerPropertyForPluginsPtr(Debugger &, const ConstString &,
-                                 const ConstString &, bool can_create);
+GetDebuggerPropertyForPluginsPtr(Debugger &, ConstString ,
+                                 ConstString , bool can_create);
 
 lldb::OptionValuePropertiesSP
-GetSettingForPlugin(Debugger &debugger, const ConstString &setting_name,
-                    const ConstString &plugin_type_name,
+GetSettingForPlugin(Debugger &debugger, ConstString setting_name,
+                    ConstString plugin_type_name,
                     GetDebuggerPropertyForPluginsPtr get_debugger_property =
                         GetDebuggerPropertyForPlugins) {
   lldb::OptionValuePropertiesSP properties_sp;
@@ -2457,10 +2457,10 @@ GetSettingForPlugin(Debugger &debugger, const ConstString &setting_name,
 }
 
 bool CreateSettingForPlugin(
-    Debugger &debugger, const ConstString &plugin_type_name,
-    const ConstString &plugin_type_desc,
+    Debugger &debugger, ConstString plugin_type_name,
+    ConstString plugin_type_desc,
     const lldb::OptionValuePropertiesSP &properties_sp,
-    const ConstString &description, bool is_global_property,
+    ConstString description, bool is_global_property,
     GetDebuggerPropertyForPluginsPtr get_debugger_property =
         GetDebuggerPropertyForPlugins) {
   if (properties_sp) {
@@ -2487,14 +2487,14 @@ const char *kStructuredDataPluginName("structured-data");
 } // anonymous namespace
 
 lldb::OptionValuePropertiesSP PluginManager::GetSettingForDynamicLoaderPlugin(
-    Debugger &debugger, const ConstString &setting_name) {
+    Debugger &debugger, ConstString setting_name) {
   return GetSettingForPlugin(debugger, setting_name,
                              ConstString(kDynamicLoaderPluginName));
 }
 
 bool PluginManager::CreateSettingForDynamicLoaderPlugin(
     Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
-    const ConstString &description, bool is_global_property) {
+    ConstString description, bool is_global_property) {
   return CreateSettingForPlugin(
       debugger, ConstString(kDynamicLoaderPluginName),
       ConstString("Settings for dynamic loader plug-ins"), properties_sp,
@@ -2503,7 +2503,7 @@ bool PluginManager::CreateSettingForDynamicLoaderPlugin(
 
 lldb::OptionValuePropertiesSP
 PluginManager::GetSettingForPlatformPlugin(Debugger &debugger,
-                                           const ConstString &setting_name) {
+                                           ConstString setting_name) {
   return GetSettingForPlugin(debugger, setting_name,
                              ConstString(kPlatformPluginName),
                              GetDebuggerPropertyForPluginsOldStyle);
@@ -2511,7 +2511,7 @@ PluginManager::GetSettingForPlatformPlugin(Debugger &debugger,
 
 bool PluginManager::CreateSettingForPlatformPlugin(
     Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
-    const ConstString &description, bool is_global_property) {
+    ConstString description, bool is_global_property) {
   return CreateSettingForPlugin(debugger, ConstString(kPlatformPluginName),
                                 ConstString("Settings for platform plug-ins"),
                                 properties_sp, description, is_global_property,
@@ -2520,14 +2520,14 @@ bool PluginManager::CreateSettingForPlatformPlugin(
 
 lldb::OptionValuePropertiesSP
 PluginManager::GetSettingForProcessPlugin(Debugger &debugger,
-                                          const ConstString &setting_name) {
+                                          ConstString setting_name) {
   return GetSettingForPlugin(debugger, setting_name,
                              ConstString(kProcessPluginName));
 }
 
 bool PluginManager::CreateSettingForProcessPlugin(
     Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
-    const ConstString &description, bool is_global_property) {
+    ConstString description, bool is_global_property) {
   return CreateSettingForPlugin(debugger, ConstString(kProcessPluginName),
                                 ConstString("Settings for process plug-ins"),
                                 properties_sp, description, is_global_property);
@@ -2535,14 +2535,14 @@ bool PluginManager::CreateSettingForProcessPlugin(
 
 lldb::OptionValuePropertiesSP
 PluginManager::GetSettingForSymbolFilePlugin(Debugger &debugger,
-                                             const ConstString &setting_name) {
+                                             ConstString setting_name) {
   return GetSettingForPlugin(debugger, setting_name,
                              ConstString(kSymbolFilePluginName));
 }
 
 bool PluginManager::CreateSettingForSymbolFilePlugin(
     Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
-    const ConstString &description, bool is_global_property) {
+    ConstString description, bool is_global_property) {
   return CreateSettingForPlugin(
       debugger, ConstString(kSymbolFilePluginName),
       ConstString("Settings for symbol file plug-ins"), properties_sp,
@@ -2551,14 +2551,14 @@ bool PluginManager::CreateSettingForSymbolFilePlugin(
 
 lldb::OptionValuePropertiesSP
 PluginManager::GetSettingForJITLoaderPlugin(Debugger &debugger,
-                                            const ConstString &setting_name) {
+                                            ConstString setting_name) {
   return GetSettingForPlugin(debugger, setting_name,
                              ConstString(kJITLoaderPluginName));
 }
 
 bool PluginManager::CreateSettingForJITLoaderPlugin(
     Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
-    const ConstString &description, bool is_global_property) {
+    ConstString description, bool is_global_property) {
   return CreateSettingForPlugin(debugger, ConstString(kJITLoaderPluginName),
                                 ConstString("Settings for JIT loader plug-ins"),
                                 properties_sp, description, is_global_property);
@@ -2567,7 +2567,7 @@ bool PluginManager::CreateSettingForJITLoaderPlugin(
 static const char *kOperatingSystemPluginName("os");
 
 lldb::OptionValuePropertiesSP PluginManager::GetSettingForOperatingSystemPlugin(
-    Debugger &debugger, const ConstString &setting_name) {
+    Debugger &debugger, ConstString setting_name) {
   lldb::OptionValuePropertiesSP properties_sp;
   lldb::OptionValuePropertiesSP plugin_type_properties_sp(
       GetDebuggerPropertyForPlugins(
@@ -2582,7 +2582,7 @@ lldb::OptionValuePropertiesSP PluginManager::GetSettingForOperatingSystemPlugin(
 
 bool PluginManager::CreateSettingForOperatingSystemPlugin(
     Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
-    const ConstString &description, bool is_global_property) {
+    ConstString description, bool is_global_property) {
   if (properties_sp) {
     lldb::OptionValuePropertiesSP plugin_type_properties_sp(
         GetDebuggerPropertyForPlugins(
@@ -2599,14 +2599,14 @@ bool PluginManager::CreateSettingForOperatingSystemPlugin(
 }
 
 lldb::OptionValuePropertiesSP PluginManager::GetSettingForStructuredDataPlugin(
-    Debugger &debugger, const ConstString &setting_name) {
+    Debugger &debugger, ConstString setting_name) {
   return GetSettingForPlugin(debugger, setting_name,
                              ConstString(kStructuredDataPluginName));
 }
 
 bool PluginManager::CreateSettingForStructuredDataPlugin(
     Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
-    const ConstString &description, bool is_global_property) {
+    ConstString description, bool is_global_property) {
   return CreateSettingForPlugin(
       debugger, ConstString(kStructuredDataPluginName),
       ConstString("Settings for structured data plug-ins"), properties_sp,
index 16c764aef392957383ce19b28673846046d421fc..5957a2b8dc8f909878f99a9b3074ec94e91c32fe 100644 (file)
@@ -34,7 +34,7 @@ void RichManglingContext::ResetProvider(InfoProvider new_provider) {
   m_provider = new_provider;
 }
 
-bool RichManglingContext::FromItaniumName(const ConstString &mangled) {
+bool RichManglingContext::FromItaniumName(ConstString mangled) {
   bool err = m_ipd.partialDemangle(mangled.GetCString());
   if (!err) {
     ResetProvider(ItaniumPartialDemangler);
@@ -53,7 +53,7 @@ bool RichManglingContext::FromItaniumName(const ConstString &mangled) {
   return !err; // true == success
 }
 
-bool RichManglingContext::FromCxxMethodName(const ConstString &demangled) {
+bool RichManglingContext::FromCxxMethodName(ConstString demangled) {
   ResetProvider(PluginCxxLanguage);
   m_cxx_method_parser = new CPlusPlusLanguage::MethodName(demangled);
   return true;
index a139d69f438044eae405b0b1394d7ffa74c5801e..1fa5a8cc0c2cf17378234f1ef0f1131183fc38fc 100644 (file)
@@ -143,7 +143,7 @@ const char *Section::GetTypeAsCString() const {
 }
 
 Section::Section(const ModuleSP &module_sp, ObjectFile *obj_file,
-                 user_id_t sect_id, const ConstString &name,
+                 user_id_t sect_id, ConstString name,
                  SectionType sect_type, addr_t file_addr, addr_t byte_size,
                  lldb::offset_t file_offset, lldb::offset_t file_size,
                  uint32_t log2align, uint32_t flags,
@@ -165,7 +165,7 @@ Section::Section(const ModuleSP &module_sp, ObjectFile *obj_file,
 
 Section::Section(const lldb::SectionSP &parent_section_sp,
                  const ModuleSP &module_sp, ObjectFile *obj_file,
-                 user_id_t sect_id, const ConstString &name,
+                 user_id_t sect_id, ConstString name,
                  SectionType sect_type, addr_t file_addr, addr_t byte_size,
                  lldb::offset_t file_offset, lldb::offset_t file_size,
                  uint32_t log2align, uint32_t flags,
@@ -506,7 +506,7 @@ SectionSP SectionList::GetSectionAtIndex(size_t idx) const {
 }
 
 SectionSP
-SectionList::FindSectionByName(const ConstString &section_dstr) const {
+SectionList::FindSectionByName(ConstString section_dstr) const {
   SectionSP sect_sp;
   // Check if we have a valid section string
   if (section_dstr && !m_sections.empty()) {
index 3331ead828d482eda376805105ff8dd5d23b1634..3a656766dcecabe38cc334493e61898c9a840212 100644 (file)
@@ -94,7 +94,7 @@ Properties::Apropos(llvm::StringRef keyword,
 
 lldb::OptionValuePropertiesSP
 Properties::GetSubProperty(const ExecutionContext *exe_ctx,
-                           const ConstString &name) {
+                           ConstString name) {
   OptionValuePropertiesSP properties_sp(GetValueProperties());
   if (properties_sp)
     return properties_sp->GetSubProperty(exe_ctx, name);
index b0a19620a030b8656a58c6b2474235c1938fa830..e749315dcdeb53d62d6c701ca1f60af405a607a3 100644 (file)
@@ -350,7 +350,7 @@ const Status &ValueObject::GetError() {
   return m_error;
 }
 
-const ConstString &ValueObject::GetName() const { return m_name; }
+ConstString ValueObject::GetName() const { return m_name; }
 
 const char *ValueObject::GetLocationAsCString() {
   return GetLocationAsCStringImpl(m_value, m_data);
@@ -543,13 +543,13 @@ lldb::ValueObjectSP ValueObject::GetChildAtNamePath(
   return root;
 }
 
-size_t ValueObject::GetIndexOfChildWithName(const ConstString &name) {
+size_t ValueObject::GetIndexOfChildWithName(ConstString name) {
   bool omit_empty_base_classes = true;
   return GetCompilerType().GetIndexOfChildWithName(name.GetCString(),
                                                    omit_empty_base_classes);
 }
 
-ValueObjectSP ValueObject::GetChildMemberWithName(const ConstString &name,
+ValueObjectSP ValueObject::GetChildMemberWithName(ConstString name,
                                                   bool can_create) {
   // when getting a child by name, it could be buried inside some base classes
   // (which really aren't part of the expression path), so we need a vector of
@@ -617,7 +617,7 @@ void ValueObject::SetNumChildren(size_t num_children) {
   m_children.SetChildrenCount(num_children);
 }
 
-void ValueObject::SetName(const ConstString &name) { m_name = name; }
+void ValueObject::SetName(ConstString name) { m_name = name; }
 
 ValueObject *ValueObject::CreateChildAtIndex(size_t idx,
                                              bool synthetic_array_member,
@@ -1657,12 +1657,12 @@ LanguageType ValueObject::GetObjectRuntimeLanguage() {
   return GetCompilerType().GetMinimumLanguage();
 }
 
-void ValueObject::AddSyntheticChild(const ConstString &key,
+void ValueObject::AddSyntheticChild(ConstString key,
                                     ValueObject *valobj) {
   m_synthetic_children[key] = valobj;
 }
 
-ValueObjectSP ValueObject::GetSyntheticChild(const ConstString &key) const {
+ValueObjectSP ValueObject::GetSyntheticChild(ConstString key) const {
   ValueObjectSP synthetic_child_sp;
   std::map<ConstString, ValueObject *>::const_iterator pos =
       m_synthetic_children.find(key);
@@ -2740,7 +2740,7 @@ void ValueObject::Dump(Stream &s, const DumpValueObjectOptions &options) {
   printer.PrintValueObject();
 }
 
-ValueObjectSP ValueObject::CreateConstantValue(const ConstString &name) {
+ValueObjectSP ValueObject::CreateConstantValue(ConstString name) {
   ValueObjectSP valobj_sp;
 
   if (UpdateValueIfNeeded(false) && m_error.Success()) {
@@ -2916,7 +2916,7 @@ ValueObjectSP ValueObject::Cast(const CompilerType &compiler_type) {
   return ValueObjectCast::Create(*this, GetName(), compiler_type);
 }
 
-lldb::ValueObjectSP ValueObject::Clone(const ConstString &new_name) {
+lldb::ValueObjectSP ValueObject::Clone(ConstString new_name) {
   return ValueObjectCast::Create(*this, new_name, GetCompilerType());
 }
 
index d588f0308ed480d59601dc9d7833f7ea87d74f4b..6ccda8c32915e3a9c16b999446d2f4ec35622898 100644 (file)
@@ -22,14 +22,14 @@ class ConstString;
 using namespace lldb_private;
 
 lldb::ValueObjectSP ValueObjectCast::Create(ValueObject &parent,
-                                            const ConstString &name,
+                                            ConstString name,
                                             const CompilerType &cast_type) {
   ValueObjectCast *cast_valobj_ptr =
       new ValueObjectCast(parent, name, cast_type);
   return cast_valobj_ptr->GetSP();
 }
 
-ValueObjectCast::ValueObjectCast(ValueObject &parent, const ConstString &name,
+ValueObjectCast::ValueObjectCast(ValueObject &parent, ConstString name,
                                  const CompilerType &cast_type)
     : ValueObject(parent), m_cast_type(cast_type) {
   SetName(name);
index e12ed57b9edc19c9e4b1f6dfd9c1c6000f3f5838..01f2e20dd0bcd0173019df5c871a5247cca02ed9 100644 (file)
@@ -28,7 +28,7 @@ using namespace lldb_private;
 
 ValueObjectChild::ValueObjectChild(
     ValueObject &parent, const CompilerType &compiler_type,
-    const ConstString &name, uint64_t byte_size, int32_t byte_offset,
+    ConstString name, uint64_t byte_size, int32_t byte_offset,
     uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset,
     bool is_base_class, bool is_deref_of_parent,
     AddressType child_ptr_or_ref_addr_type, uint64_t language_flags)
index f69731ba004f5b7ea126b43ecc8300749f62fe9c..a1b2cac96874f5fa5fce1704c6a38bc81c4f5028 100644 (file)
@@ -49,7 +49,7 @@ ValueObjectConstResult::ValueObjectConstResult(ExecutionContextScope *exe_scope,
 
 ValueObjectSP ValueObjectConstResult::Create(ExecutionContextScope *exe_scope,
                                              const CompilerType &compiler_type,
-                                             const ConstString &name,
+                                             ConstString name,
                                              const DataExtractor &data,
                                              lldb::addr_t address) {
   return (new ValueObjectConstResult(exe_scope, compiler_type, name, data,
@@ -59,7 +59,7 @@ ValueObjectSP ValueObjectConstResult::Create(ExecutionContextScope *exe_scope,
 
 ValueObjectConstResult::ValueObjectConstResult(
     ExecutionContextScope *exe_scope, const CompilerType &compiler_type,
-    const ConstString &name, const DataExtractor &data, lldb::addr_t address)
+    ConstString name, const DataExtractor &data, lldb::addr_t address)
     : ValueObject(exe_scope), m_type_name(), m_byte_size(0),
       m_impl(this, address) {
   m_data = data;
@@ -81,7 +81,7 @@ ValueObjectConstResult::ValueObjectConstResult(
 
 ValueObjectSP ValueObjectConstResult::Create(ExecutionContextScope *exe_scope,
                                              const CompilerType &compiler_type,
-                                             const ConstString &name,
+                                             ConstString name,
                                              const lldb::DataBufferSP &data_sp,
                                              lldb::ByteOrder data_byte_order,
                                              uint32_t data_addr_size,
@@ -93,14 +93,14 @@ ValueObjectSP ValueObjectConstResult::Create(ExecutionContextScope *exe_scope,
 
 ValueObjectSP ValueObjectConstResult::Create(ExecutionContextScope *exe_scope,
                                              Value &value,
-                                             const ConstString &name,
+                                             ConstString name,
                                              Module *module) {
   return (new ValueObjectConstResult(exe_scope, value, name, module))->GetSP();
 }
 
 ValueObjectConstResult::ValueObjectConstResult(
     ExecutionContextScope *exe_scope, const CompilerType &compiler_type,
-    const ConstString &name, const lldb::DataBufferSP &data_sp,
+    ConstString name, const lldb::DataBufferSP &data_sp,
     lldb::ByteOrder data_byte_order, uint32_t data_addr_size,
     lldb::addr_t address)
     : ValueObject(exe_scope), m_type_name(), m_byte_size(0),
@@ -120,7 +120,7 @@ ValueObjectConstResult::ValueObjectConstResult(
 
 ValueObjectSP ValueObjectConstResult::Create(ExecutionContextScope *exe_scope,
                                              const CompilerType &compiler_type,
-                                             const ConstString &name,
+                                             ConstString name,
                                              lldb::addr_t address,
                                              AddressType address_type,
                                              uint32_t addr_byte_size) {
@@ -131,7 +131,7 @@ ValueObjectSP ValueObjectConstResult::Create(ExecutionContextScope *exe_scope,
 
 ValueObjectConstResult::ValueObjectConstResult(
     ExecutionContextScope *exe_scope, const CompilerType &compiler_type,
-    const ConstString &name, lldb::addr_t address, AddressType address_type,
+    ConstString name, lldb::addr_t address, AddressType address_type,
     uint32_t addr_byte_size)
     : ValueObject(exe_scope), m_type_name(), m_byte_size(0),
       m_impl(this, address) {
@@ -175,7 +175,7 @@ ValueObjectConstResult::ValueObjectConstResult(ExecutionContextScope *exe_scope,
 
 ValueObjectConstResult::ValueObjectConstResult(ExecutionContextScope *exe_scope,
                                                const Value &value,
-                                               const ConstString &name,
+                                               ConstString name,
                                                Module *module)
     : ValueObject(exe_scope), m_type_name(), m_byte_size(0), m_impl(this) {
   m_value = value;
index 2c1264f479bbdd4dfb1fc68256930292e6a2f08a..b47e699e30f10d2febdcf843ac5f8b46e3a19339 100644 (file)
@@ -21,7 +21,7 @@ class ValueObject;
 using namespace lldb_private;
 
 ValueObjectConstResultCast::ValueObjectConstResultCast(
-    ValueObject &parent, const ConstString &name, const CompilerType &cast_type,
+    ValueObject &parent, ConstString name, const CompilerType &cast_type,
     lldb::addr_t live_address)
     : ValueObjectCast(parent, name, cast_type), m_impl(this, live_address) {
   m_name = name;
index 747e40911060888a6124a15065ec1770fe24ef6e..4e0b303b69d59b00e778bdcb8fd87bcb8ee09ad5 100644 (file)
@@ -23,7 +23,7 @@ using namespace lldb_private;
 
 ValueObjectConstResultChild::ValueObjectConstResultChild(
     ValueObject &parent, const CompilerType &compiler_type,
-    const ConstString &name, uint32_t byte_size, int32_t byte_offset,
+    ConstString name, uint32_t byte_size, int32_t byte_offset,
     uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset,
     bool is_base_class, bool is_deref_of_parent, lldb::addr_t live_address,
     uint64_t language_flags)
index ea8afec0e11373a72da679035961c1eac5177f37..1d12747649e3dca94137c6ffcd5a2a38758b9d92 100644 (file)
@@ -186,7 +186,7 @@ ValueObject *ValueObjectRegisterSet::CreateChildAtIndex(
 }
 
 lldb::ValueObjectSP
-ValueObjectRegisterSet::GetChildMemberWithName(const ConstString &name,
+ValueObjectRegisterSet::GetChildMemberWithName(ConstString name,
                                                bool can_create) {
   ValueObject *valobj = NULL;
   if (m_reg_ctx_sp && m_reg_set) {
@@ -203,7 +203,7 @@ ValueObjectRegisterSet::GetChildMemberWithName(const ConstString &name,
 }
 
 size_t
-ValueObjectRegisterSet::GetIndexOfChildWithName(const ConstString &name) {
+ValueObjectRegisterSet::GetIndexOfChildWithName(ConstString name) {
   if (m_reg_ctx_sp && m_reg_set) {
     const RegisterInfo *reg_info =
         m_reg_ctx_sp->GetRegisterInfoByName(name.AsCString());
index a701d9246b342ea5d4dbb4e8302dd9186e329391..40047323575927c6e89f25dcb4ae4e4bfa6200c5 100644 (file)
@@ -36,7 +36,7 @@ public:
     return m_backend.GetChildAtIndex(idx, true);
   }
 
-  size_t GetIndexOfChildWithName(const ConstString &name) override {
+  size_t GetIndexOfChildWithName(ConstString name) override {
     return m_backend.GetIndexOfChildWithName(name);
   }
 
@@ -283,7 +283,7 @@ lldb::ValueObjectSP ValueObjectSynthetic::GetChildAtIndex(size_t idx,
 }
 
 lldb::ValueObjectSP
-ValueObjectSynthetic::GetChildMemberWithName(const ConstString &name,
+ValueObjectSynthetic::GetChildMemberWithName(ConstString name,
                                              bool can_create) {
   UpdateValueIfNeeded();
 
@@ -295,7 +295,7 @@ ValueObjectSynthetic::GetChildMemberWithName(const ConstString &name,
   return GetChildAtIndex(index, can_create);
 }
 
-size_t ValueObjectSynthetic::GetIndexOfChildWithName(const ConstString &name) {
+size_t ValueObjectSynthetic::GetIndexOfChildWithName(ConstString name) {
   UpdateValueIfNeeded();
 
   uint32_t found_index = UINT32_MAX;
index 7ec3a9381d91dd74958379adeabbf36fe14f31b6..300ce2a08ba197f559a783f36e01d9d34465843b 100644 (file)
@@ -96,7 +96,7 @@ bool DataVisualization::AnyMatches(
                                        matching_category, matching_type);
 }
 
-bool DataVisualization::Categories::GetCategory(const ConstString &category,
+bool DataVisualization::Categories::GetCategory(ConstString category,
                                                 lldb::TypeCategoryImplSP &entry,
                                                 bool allow_create) {
   entry = GetFormatManager().GetCategory(category, allow_create);
@@ -111,11 +111,11 @@ bool DataVisualization::Categories::GetCategory(
   return (entry.get() != nullptr);
 }
 
-void DataVisualization::Categories::Add(const ConstString &category) {
+void DataVisualization::Categories::Add(ConstString category) {
   GetFormatManager().GetCategory(category);
 }
 
-bool DataVisualization::Categories::Delete(const ConstString &category) {
+bool DataVisualization::Categories::Delete(ConstString category) {
   GetFormatManager().DisableCategory(category);
   return GetFormatManager().DeleteCategory(category);
 }
@@ -124,12 +124,12 @@ void DataVisualization::Categories::Clear() {
   GetFormatManager().ClearCategories();
 }
 
-void DataVisualization::Categories::Clear(const ConstString &category) {
+void DataVisualization::Categories::Clear(ConstString category) {
   GetFormatManager().GetCategory(category)->Clear(
       eFormatCategoryItemSummary | eFormatCategoryItemRegexSummary);
 }
 
-void DataVisualization::Categories::Enable(const ConstString &category,
+void DataVisualization::Categories::Enable(ConstString category,
                                            TypeCategoryMap::Position pos) {
   if (GetFormatManager().GetCategory(category)->IsEnabled())
     GetFormatManager().DisableCategory(category);
@@ -143,7 +143,7 @@ void DataVisualization::Categories::Enable(lldb::LanguageType lang_type) {
     lang_category->Enable();
 }
 
-void DataVisualization::Categories::Disable(const ConstString &category) {
+void DataVisualization::Categories::Disable(ConstString category) {
   if (GetFormatManager().GetCategory(category)->IsEnabled())
     GetFormatManager().DisableCategory(category);
 }
@@ -192,17 +192,17 @@ DataVisualization::Categories::GetCategoryAtIndex(size_t index) {
 }
 
 bool DataVisualization::NamedSummaryFormats::GetSummaryFormat(
-    const ConstString &type, lldb::TypeSummaryImplSP &entry) {
+    ConstString type, lldb::TypeSummaryImplSP &entry) {
   return GetFormatManager().GetNamedSummaryContainer().Get(type, entry);
 }
 
 void DataVisualization::NamedSummaryFormats::Add(
-    const ConstString &type, const lldb::TypeSummaryImplSP &entry) {
+    ConstString type, const lldb::TypeSummaryImplSP &entry) {
   GetFormatManager().GetNamedSummaryContainer().Add(
       FormatManager::GetValidTypeName(type), entry);
 }
 
-bool DataVisualization::NamedSummaryFormats::Delete(const ConstString &type) {
+bool DataVisualization::NamedSummaryFormats::Delete(ConstString type) {
   return GetFormatManager().GetNamedSummaryContainer().Delete(type);
 }
 
index c05b116b6acbac5e0f3650cc303b4d5919389f2f..7e328cb0dac85b0859f9f016e3d0fd88011af1e3 100644 (file)
@@ -109,7 +109,7 @@ FormatCache::FormatCache()
 {
 }
 
-FormatCache::Entry &FormatCache::GetEntry(const ConstString &type) {
+FormatCache::Entry &FormatCache::GetEntry(ConstString type) {
   auto i = m_map.find(type), e = m_map.end();
   if (i != e)
     return i->second;
@@ -117,7 +117,7 @@ FormatCache::Entry &FormatCache::GetEntry(const ConstString &type) {
   return m_map[type];
 }
 
-bool FormatCache::GetFormat(const ConstString &type,
+bool FormatCache::GetFormat(ConstString type,
                             lldb::TypeFormatImplSP &format_sp) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
   auto entry = GetEntry(type);
@@ -135,7 +135,7 @@ bool FormatCache::GetFormat(const ConstString &type,
   return false;
 }
 
-bool FormatCache::GetSummary(const ConstString &type,
+bool FormatCache::GetSummary(ConstString type,
                              lldb::TypeSummaryImplSP &summary_sp) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
   auto entry = GetEntry(type);
@@ -153,7 +153,7 @@ bool FormatCache::GetSummary(const ConstString &type,
   return false;
 }
 
-bool FormatCache::GetSynthetic(const ConstString &type,
+bool FormatCache::GetSynthetic(ConstString type,
                                lldb::SyntheticChildrenSP &synthetic_sp) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
   auto entry = GetEntry(type);
@@ -171,7 +171,7 @@ bool FormatCache::GetSynthetic(const ConstString &type,
   return false;
 }
 
-bool FormatCache::GetValidator(const ConstString &type,
+bool FormatCache::GetValidator(ConstString type,
                                lldb::TypeValidatorImplSP &validator_sp) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
   auto entry = GetEntry(type);
@@ -189,25 +189,25 @@ bool FormatCache::GetValidator(const ConstString &type,
   return false;
 }
 
-void FormatCache::SetFormat(const ConstString &type,
+void FormatCache::SetFormat(ConstString type,
                             lldb::TypeFormatImplSP &format_sp) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
   GetEntry(type).SetFormat(format_sp);
 }
 
-void FormatCache::SetSummary(const ConstString &type,
+void FormatCache::SetSummary(ConstString type,
                              lldb::TypeSummaryImplSP &summary_sp) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
   GetEntry(type).SetSummary(summary_sp);
 }
 
-void FormatCache::SetSynthetic(const ConstString &type,
+void FormatCache::SetSynthetic(ConstString type,
                                lldb::SyntheticChildrenSP &synthetic_sp) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
   GetEntry(type).SetSynthetic(synthetic_sp);
 }
 
-void FormatCache::SetValidator(const ConstString &type,
+void FormatCache::SetValidator(ConstString type,
                                lldb::TypeValidatorImplSP &validator_sp) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
   GetEntry(type).SetValidator(validator_sp);
index 16d24621f7562c5bba9e250798c140a24381fb9f..0dcc0244e3f34ab14d8c1f8bfac8580694f3fa65 100644 (file)
@@ -431,7 +431,7 @@ void FormatManager::ForEachCategory(TypeCategoryMap::ForEachCallback callback) {
 }
 
 lldb::TypeCategoryImplSP
-FormatManager::GetCategory(const ConstString &category_name, bool can_create) {
+FormatManager::GetCategory(ConstString category_name, bool can_create) {
   if (!category_name)
     return GetCategory(m_default_category_name);
   lldb::TypeCategoryImplSP category;
@@ -573,7 +573,7 @@ bool FormatManager::ShouldPrintAsOneLiner(ValueObject &valobj) {
   return true;
 }
 
-ConstString FormatManager::GetValidTypeName(const ConstString &type) {
+ConstString FormatManager::GetValidTypeName(ConstString type) {
   return ::GetValidTypeName_Impl(type);
 }
 
index 2366958b0e0e0d724f475a1a57a4862d52f5f6d5..ccc5d198b22602869151615f3b949772d4caaf80 100644 (file)
@@ -51,7 +51,7 @@ bool TypeFilterImpl::SetExpressionPathAtIndex(size_t i,
 }
 
 size_t
-TypeFilterImpl::FrontEnd::GetIndexOfChildWithName(const ConstString &name) {
+TypeFilterImpl::FrontEnd::GetIndexOfChildWithName(ConstString name) {
   const char *name_cstr = name.GetCString();
   if (name_cstr) {
     for (size_t i = 0; i < filter->GetCount(); i++) {
@@ -188,7 +188,7 @@ bool ScriptedSyntheticChildren::FrontEnd::MightHaveChildren() {
 }
 
 size_t ScriptedSyntheticChildren::FrontEnd::GetIndexOfChildWithName(
-    const ConstString &name) {
+    ConstString name) {
   if (!m_wrapper_sp || m_interpreter == NULL)
     return UINT32_MAX;
   return m_interpreter->GetIndexOfChildWithName(m_wrapper_sp,
index de59724d1e36ea23cab654ec11ffb87d3d497fd0..18880f72ef2e9bb230ce77aa2fc8d12fe3476a90 100644 (file)
@@ -233,7 +233,7 @@ public:
 
   bool MightHaveChildren() override { return true; }
 
-  size_t GetIndexOfChildWithName(const ConstString &name) override {
+  size_t GetIndexOfChildWithName(ConstString name) override {
     const char *item_name = name.GetCString();
     uint32_t idx = ExtractIndexFromString(item_name);
     if (idx < UINT32_MAX && idx >= CalculateNumChildren())
index 160c9ad6cfa478c8c629db15a3a2cbf813eea973..faac977cde98e0cf0098bdbe4fc1d0269fd45091 100644 (file)
@@ -30,7 +30,7 @@ uint8_t *ExpressionVariable::GetValueBytes() {
 
 PersistentExpressionState::~PersistentExpressionState() {}
 
-lldb::addr_t PersistentExpressionState::LookupSymbol(const ConstString &name) {
+lldb::addr_t PersistentExpressionState::LookupSymbol(ConstString name) {
   SymbolMap::iterator si = m_symbol_map.find(name.GetCString());
 
   if (si != m_symbol_map.end())
index 6528a2744bb4cfca105994cba0f60d49d9b502b6..15c2a7d83eb13c6f231c959b8c32adc8617a167b 100644 (file)
@@ -212,7 +212,7 @@ static void ReportInlineAsmError(const llvm::SMDiagnostic &diagnostic,
   }
 }
 
-void IRExecutionUnit::ReportSymbolLookupError(const ConstString &name) {
+void IRExecutionUnit::ReportSymbolLookupError(ConstString name) {
   m_failed_lookups.push_back(name);
 }
 
@@ -406,7 +406,7 @@ void IRExecutionUnit::GetRunnableInfo(Status &error, lldb::addr_t &func_addr,
 
     bool emitNewLine = false;
 
-    for (const ConstString &failed_lookup : m_failed_lookups) {
+    for (ConstString failed_lookup : m_failed_lookups) {
       if (emitNewLine)
         ss.PutCString("\n");
       emitNewLine = true;
@@ -655,7 +655,7 @@ uint8_t *IRExecutionUnit::MemoryManager::allocateDataSection(
 }
 
 static ConstString
-FindBestAlternateMangledName(const ConstString &demangled,
+FindBestAlternateMangledName(ConstString demangled,
                              const lldb::LanguageType &lang_type,
                              const SymbolContext &sym_ctx) {
   CPlusPlusLanguage::MethodName cpp_name(demangled);
@@ -717,7 +717,7 @@ struct IRExecutionUnit::SearchSpec {
 
 void IRExecutionUnit::CollectCandidateCNames(
     std::vector<IRExecutionUnit::SearchSpec> &C_specs,
-    const ConstString &name) {
+    ConstString name) {
   if (m_strip_underscore && name.AsCString()[0] == '_')
     C_specs.insert(C_specs.begin(), ConstString(&name.AsCString()[1]));
   C_specs.push_back(SearchSpec(name));
@@ -727,7 +727,7 @@ void IRExecutionUnit::CollectCandidateCPlusPlusNames(
     std::vector<IRExecutionUnit::SearchSpec> &CPP_specs,
     const std::vector<SearchSpec> &C_specs, const SymbolContext &sc) {
   for (const SearchSpec &C_spec : C_specs) {
-    const ConstString &name = C_spec.name;
+    ConstString name = C_spec.name;
 
     if (CPlusPlusLanguage::IsCPPMangledName(name.GetCString())) {
       Mangled mangled(name, true);
@@ -759,7 +759,7 @@ void IRExecutionUnit::CollectFallbackNames(
   // but the DWARF doesn't always encode "extern C" correctly.
 
   for (const SearchSpec &C_spec : C_specs) {
-    const ConstString &name = C_spec.name;
+    ConstString name = C_spec.name;
 
     if (CPlusPlusLanguage::IsCPPMangledName(name.GetCString())) {
       Mangled mangled_name(name);
@@ -938,7 +938,7 @@ lldb::addr_t IRExecutionUnit::FindInUserDefinedSymbols(
 }
 
 lldb::addr_t
-IRExecutionUnit::FindSymbol(const lldb_private::ConstString &name) {
+IRExecutionUnit::FindSymbol(lldb_private::ConstString name) {
   std::vector<SearchSpec> candidate_C_names;
   std::vector<SearchSpec> candidate_CPlusPlus_names;
 
index 33159626acc0041e422a735419077500a267507f..7ce86345b9cca431897d9449ad0b93d388585ad4 100644 (file)
@@ -305,12 +305,12 @@ FileSystem::CreateDataBuffer(const FileSpec &file_spec, uint64_t size,
 
 bool FileSystem::ResolveExecutableLocation(FileSpec &file_spec) {
   // If the directory is set there's nothing to do.
-  const ConstString &directory = file_spec.GetDirectory();
+  ConstString directory = file_spec.GetDirectory();
   if (directory)
     return false;
 
   // We cannot look for a file if there's no file name.
-  const ConstString &filename = file_spec.GetFilename();
+  ConstString filename = file_spec.GetFilename();
   if (!filename)
     return false;
 
index 3268303ba0c255297454138523e52be02a133170..eb66c485bfd177f0cb86aad0c58d2587e7ca3c65 100644 (file)
@@ -276,7 +276,7 @@ Status OptionValueDictionary::SetSubValue(const ExecutionContext *exe_ctx,
 }
 
 lldb::OptionValueSP
-OptionValueDictionary::GetValueForKey(const ConstString &key) const {
+OptionValueDictionary::GetValueForKey(ConstString key) const {
   lldb::OptionValueSP value_sp;
   collection::const_iterator pos = m_values.find(key);
   if (pos != m_values.end())
@@ -284,7 +284,7 @@ OptionValueDictionary::GetValueForKey(const ConstString &key) const {
   return value_sp;
 }
 
-bool OptionValueDictionary::SetValueForKey(const ConstString &key,
+bool OptionValueDictionary::SetValueForKey(ConstString key,
                                            const lldb::OptionValueSP &value_sp,
                                            bool can_replace) {
   // Make sure the value_sp object is allowed to contain values of the type
@@ -301,7 +301,7 @@ bool OptionValueDictionary::SetValueForKey(const ConstString &key,
   return false;
 }
 
-bool OptionValueDictionary::DeleteValueForKey(const ConstString &key) {
+bool OptionValueDictionary::DeleteValueForKey(ConstString key) {
   collection::iterator pos = m_values.find(key);
   if (pos != m_values.end()) {
     m_values.erase(pos);
index 63ed4447f429959d4c451398a73213541adb8cb4..6693cc9d4c18566b1ca96096c01ad321781b6387 100644 (file)
@@ -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 @@ void OptionValueProperties::SetValueChangedCallback(
     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 @@ void OptionValueProperties::AppendProperty(const ConstString &name,
 //
 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 @@ Status OptionValueProperties::SetSubValue(const ExecutionContext *exe_ctx,
 }
 
 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 @@ void OptionValueProperties::Apropos(
 
 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 eafa7afc1b1caf946efd77fbfb4b0525f28a4828..78209311e2e51c5fab99a7d243d50db54d935ab8 100644 (file)
@@ -218,7 +218,7 @@ Property::Property(const PropertyDefinition &definition)
   }
 }
 
-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 a9e643acc4ac7e87d60edf84fead7d7e1e91f7da..a96c795e450b211288fa1829969aa7b1a1dca8e3 100644 (file)
@@ -59,7 +59,7 @@ static lldb::addr_t findSymbolAddress(Process *proc, ConstString findName) {
   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 c561eb401f57374bf29aff1de02ec568688042f2..87e43eb6027221bafe9dd1be814300f68f7b7028 100644 (file)
@@ -728,7 +728,7 @@ void DynamicLoaderDarwin::Segment::PutToLog(Log *log,
 }
 
 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 @@ DynamicLoaderDarwin::GetStepThroughTrampolinePlan(Thread &thread,
     std::vector<Address> 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 @@ DynamicLoaderDarwin::GetStepThroughTrampolinePlan(Thread &thread,
 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 b3e00830fdd949f42a081aae2a6a1b51ae38d5c4..298e75ca1a37e5d7ec46debe76b5f292692ddbd7 100644 (file)
@@ -157,7 +157,7 @@ protected:
                                     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 316f06295eafdb1b213709d46237d8ca84c34996..1c8e3c7a68caa94d4eed3565ccc4130bfce63195 100644 (file)
@@ -1836,7 +1836,7 @@ bool ClangASTSource::layoutRecordType(const RecordDecl *record, uint64_t &size,
 }
 
 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 cf305b42d251c37deb4f3c2b2967293c472d56a7..063d82e1c9ea75039974342c236e3ff9c19aca6d 100644 (file)
@@ -198,7 +198,7 @@ public:
   ///     one.
   //------------------------------------------------------------------
   void CompleteNamespaceMap(
-      ClangASTImporter::NamespaceMapSP &namespace_map, const ConstString &name,
+      ClangASTImporter::NamespaceMapSP &namespace_map, ConstString name,
       ClangASTImporter::NamespaceMapSP &parent_map) const override;
 
   //
index 24ca970d9fc8d9662981eb65c82b832ce9771797..5212712b104561311fe7de63ecf5b6f7b66aa70c 100644 (file)
@@ -309,7 +309,7 @@ TypeFromUser ClangExpressionDeclMap::DeportType(ClangASTContext &target,
 }
 
 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::AddPersistentVariable(const NamedDecl *decl,
 }
 
 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 @@ bool ClangExpressionDeclMap::GetFunctionInfo(const NamedDecl *decl,
 
 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 @@ addr_t ClangExpressionDeclMap::GetSymbolAddress(Target &target,
   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 @@ addr_t ClangExpressionDeclMap::GetSymbolAddress(const ConstString &name,
 }
 
 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 ac6690dea0f23311ebdd151bd068f17319bc1db9..dd866c37ddb070c006f57a8c82c1b05325ce38c4 100644 (file)
@@ -138,7 +138,7 @@ public:
   ///     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 @@ public:
   /// @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 @@ public:
   ///     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 @@ private:
   ///     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 b510cd8b9898aaad6395d614572c12085d963a79..b5a2c80b534945854db5069670e318a61bb5feac 100644 (file)
@@ -31,7 +31,7 @@ ClangExpressionVariable::ClangExpressionVariable(
 }
 
 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(
 }
 
 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 731ab14dbbde3c0241c6aa28ce960d6e8250308d..b9767e22cd241b33ee4e6b7456be4e8077d644aa 100644 (file)
@@ -62,12 +62,12 @@ public:
                           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 9d5ead4c97eb0aad17735e2dc11668a0a5296c99..f7eaa8fe880408e6ca50a3dd953bb296109c88ed 100644 (file)
@@ -78,7 +78,7 @@ public:
   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<clang::NamedDecl *> &decls) override;
 
   void ForEachMacro(const ModuleVector &modules,
@@ -340,7 +340,7 @@ bool ClangModulesDeclVendorImpl::AddModulesForCompileUnit(
 // ClangImporter::lookupValue
 
 uint32_t
-ClangModulesDeclVendorImpl::FindDecls(const ConstString &name, bool append,
+ClangModulesDeclVendorImpl::FindDecls(ConstString name, bool append,
                                       uint32_t max_matches,
                                       std::vector<clang::NamedDecl *> &decls) {
   if (!m_enabled) {
index d66b4437fdb4c2940f8b8dde16e922f2cb3b211b..e77ba86eb100fc4f1734ecb8a8be2cd8b8214509 100644 (file)
@@ -31,7 +31,7 @@ ExpressionVariableSP ClangPersistentVariables::CreatePersistentVariable(
 }
 
 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 @@ void ClangPersistentVariables::RemovePersistentVariable(
     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<const char *, clang::NamedDecl *>(name.GetCString(), decl));
@@ -67,7 +67,7 @@ void ClangPersistentVariables::RegisterPersistentDecl(const ConstString &name,
 }
 
 clang::NamedDecl *
-ClangPersistentVariables::GetPersistentDecl(const ConstString &name) {
+ClangPersistentVariables::GetPersistentDecl(ConstString name) {
   PersistentDeclMap::const_iterator i =
       m_persistent_decls.find(name.GetCString());
 
index f713dc471468f9d4f2d16082918e960e2a76e35d..2b5e6de3da7b9ffda160cf09bd8326094e837cd7 100644 (file)
@@ -44,7 +44,7 @@ public:
   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 @@ public:
     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 526d787854a22b68e0016b0373bb68bc95fa36af..137a14edbbc51d24067d1ab69511910868982a23 100644 (file)
@@ -239,7 +239,7 @@ private:
   ///     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 85e54b02a7325b8d5903bb512d5d633b076f5428..a98f8601124cdbb967005a4a3e19d83f2adc8663 100644 (file)
@@ -459,7 +459,7 @@ bool JITLoaderGDB::DidSetJITBreakpoint() const {
 }
 
 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 17498af83d4558b372388533d646cc012517a37d..e9938d4c49547be2971c7f9961e69f01549cbe7e 100644 (file)
@@ -54,7 +54,7 @@ public:
 
 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 6086aff4ad9f20e734eda0944dad8e4d71497e35..87b5b5947f358e2eec99e1392b5651ab44487393 100644 (file)
@@ -149,7 +149,7 @@ public:
   // 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 70a00c06bff788aae0612f3b88f5143f0e302cc6..c6792e9a72af0f4303cb0d7fb918f9a0df6a2b7c 100644 (file)
@@ -31,7 +31,7 @@ public:
         : 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 @@ public:
       return (bool)m_full;
     }
 
-    const ConstString &GetFullName() const { return m_full; }
+    ConstString GetFullName() const { return m_full; }
 
     std::string GetScopeQualifiedName();
 
index 15d34916b661ee541cb19eef8e268dea3ceda278..e63452eb95eae6be1ff0692c1dddba1bafb16924 100644 (file)
@@ -299,7 +299,7 @@ bool lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd::
 }
 
 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 @@ bool lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEnd::
 }
 
 size_t lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEnd::
-    GetIndexOfChildWithName(const ConstString &name) {
+    GetIndexOfChildWithName(ConstString name) {
   if (name == ConstString("__ptr_"))
     return 0;
   if (name == ConstString("count"))
index 4b881597b74d946820086609ca6274522fb39388..214f5512e4a50cc0aeb99e619b9aa89d9a2601f6 100644 (file)
@@ -66,7 +66,7 @@ public:
 
   bool MightHaveChildren() override;
 
-  size_t GetIndexOfChildWithName(const ConstString &name) override;
+  size_t GetIndexOfChildWithName(ConstString name) override;
 
   ~LibCxxMapIteratorSyntheticFrontEnd() override;
 
@@ -95,7 +95,7 @@ public:
 
   bool MightHaveChildren() override;
 
-  size_t GetIndexOfChildWithName(const ConstString &name) override;
+  size_t GetIndexOfChildWithName(ConstString name) override;
 
   ~LibcxxSharedPtrSyntheticFrontEnd() override;
 
index f9f79c57982d2f0a9e520dafce29cb2f40c50ad6..b4e7a1703e46aeba4672e13c9190d65784ae9af1 100644 (file)
@@ -99,7 +99,7 @@ public:
 
   bool MightHaveChildren() override;
 
-  size_t GetIndexOfChildWithName(const ConstString &name) override;
+  size_t GetIndexOfChildWithName(ConstString name) override;
 
   lldb::ValueObjectSP GetSyntheticValue() override;
 
@@ -138,7 +138,7 @@ lldb_private::formatters::LibcxxStdAtomicSyntheticFrontEnd::GetChildAtIndex(
 }
 
 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 440f3597478de67c8902e3d2c76aae5a93b4a6d7..815dafb6c7242a8f4b419edc41eb071e2aa7099f 100644 (file)
@@ -20,7 +20,7 @@ class BitsetFrontEnd : public SyntheticChildrenFrontEnd {
 public:
   BitsetFrontEnd(ValueObject &valobj);
 
-  size_t GetIndexOfChildWithName(const ConstString &name) override {
+  size_t GetIndexOfChildWithName(ConstString name) override {
     return formatters::ExtractIndexFromString(name.GetCString());
   }
 
index 27eca9e9cc2f6b4a6ecbb83c6fb1cf9273be4097..79c7434f617f85b0b363655c03e9c5393ad3b60e 100644 (file)
@@ -33,7 +33,7 @@ public:
 
   bool MightHaveChildren() override;
 
-  size_t GetIndexOfChildWithName(const ConstString &name) override;
+  size_t GetIndexOfChildWithName(ConstString name) override;
 
 private:
   ValueObject *m_start;
@@ -108,7 +108,7 @@ bool lldb_private::formatters::LibcxxInitializerListSyntheticFrontEnd::
 }
 
 size_t lldb_private::formatters::LibcxxInitializerListSyntheticFrontEnd::
-    GetIndexOfChildWithName(const ConstString &name) {
+    GetIndexOfChildWithName(ConstString name) {
   if (!m_start)
     return UINT32_MAX;
   return ExtractIndexFromString(name.GetCString());
index ba47e2207622b3dbd1a4ee9059e1dccf12441789..d375cc2683ef67ffe84c9605afe22064372e2d89 100644 (file)
@@ -111,7 +111,7 @@ private:
 
 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 ad23fc7014ab19c2e721f9f128aa184264244d04..619c718a1c1b9beba79229cdb773ce9a90a479ed 100644 (file)
@@ -184,7 +184,7 @@ public:
 
   bool MightHaveChildren() override;
 
-  size_t GetIndexOfChildWithName(const ConstString &name) override;
+  size_t GetIndexOfChildWithName(ConstString name) override;
 
 private:
   bool GetDataType();
@@ -452,7 +452,7 @@ bool lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd::
 }
 
 size_t lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd::
-    GetIndexOfChildWithName(const ConstString &name) {
+    GetIndexOfChildWithName(ConstString name) {
   return ExtractIndexFromString(name.GetCString());
 }
 
index 7ae251b04f34825b0857ea9337bc4f178a1bce95..116021588848c570c73b189ff88ec0bebf066f19 100644 (file)
@@ -20,7 +20,7 @@ public:
     Update();
   }
 
-  size_t GetIndexOfChildWithName(const ConstString &name) override {
+  size_t GetIndexOfChildWithName(ConstString name) override {
     return formatters::ExtractIndexFromString(name.GetCString());
   }
 
index 8401e2f34c335720c700e185da008512123bafcf..4b72089c6ba2ec314bb5a92f04160b5540894c89 100644 (file)
@@ -20,7 +20,7 @@ public:
     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 276b7037d10541b2b431f9e2312448628662d8f6..8da7460f2275f554ed559500ccb9954cb690b626 100644 (file)
@@ -20,7 +20,7 @@ public:
     Update();
   }
 
-  size_t GetIndexOfChildWithName(const ConstString &name) override {
+  size_t GetIndexOfChildWithName(ConstString name) override {
     return formatters::ExtractIndexFromString(name.GetCString());
   }
 
index f4abe931d0ac80e9fd19ba7ea5d4a3d3fc8bdf51..b2c38c915c8150c6897d3a197a177a44aaed5259 100644 (file)
@@ -39,7 +39,7 @@ public:
 
   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 @@ bool lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd::
 }
 
 size_t lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd::
-    GetIndexOfChildWithName(const ConstString &name) {
+    GetIndexOfChildWithName(ConstString name) {
   return ExtractIndexFromString(name.GetCString());
 }
 
index 11f845e1da78eb5425116803bbdb1974ff6d9813..491cf048e4592cc35b0034cf8c9baa195bb6b015 100644 (file)
@@ -173,7 +173,7 @@ public:
     Update();
   }
 
-  size_t GetIndexOfChildWithName(const ConstString &name) override {
+  size_t GetIndexOfChildWithName(ConstString name) override {
     return formatters::ExtractIndexFromString(name.GetCString());
   }
 
index c3bf9f827d35d5fb63fb497d26849c8a3b1c5898..b7ed597d48a5b031536d1ebeb825a4c418d18ca7 100644 (file)
@@ -32,7 +32,7 @@ public:
 
   bool MightHaveChildren() override;
 
-  size_t GetIndexOfChildWithName(const ConstString &name) override;
+  size_t GetIndexOfChildWithName(ConstString name) override;
 
 private:
   ValueObject *m_start;
@@ -53,7 +53,7 @@ public:
 
   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 @@ bool lldb_private::formatters::LibcxxStdVectorSyntheticFrontEnd::
 }
 
 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 @@ bool lldb_private::formatters::LibcxxVectorBoolSyntheticFrontEnd::Update() {
 }
 
 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 7f00f36189294af81c4327e6de6c522de693a343..0aac93c3c7696c07bf7a8ac2530455c2892ed461 100644 (file)
@@ -49,7 +49,7 @@ public:
 
   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 @@ public:
 
   bool MightHaveChildren() override;
 
-  size_t GetIndexOfChildWithName(const ConstString &name) override;
+  size_t GetIndexOfChildWithName(ConstString name) override;
 };
 
 } // end of anonymous namespace
@@ -141,7 +141,7 @@ LibstdcppMapIteratorSyntheticFrontEnd::GetChildAtIndex(size_t idx) {
 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 @@ VectorIteratorSyntheticFrontEnd::GetChildAtIndex(size_t idx) {
 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::Update() { return false; }
 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 111b28b965a076d9e850e8f8bb66c032b762b36b..66624e5beb6dc83ba57a15462e6a4782e9e3b8e4 100644 (file)
@@ -34,7 +34,7 @@ public:
 
   bool MightHaveChildren() override;
 
-  size_t GetIndexOfChildWithName(const ConstString &name) override;
+  size_t GetIndexOfChildWithName(ConstString name) override;
 
 private:
   std::vector<ValueObjectSP> m_members;
@@ -95,7 +95,7 @@ size_t LibStdcppTupleSyntheticFrontEnd::CalculateNumChildren() {
 }
 
 size_t LibStdcppTupleSyntheticFrontEnd::GetIndexOfChildWithName(
-    const ConstString &name) {
+    ConstString name) {
   return ExtractIndexFromString(name.GetCString());
 }
 
index 335523e10b2633a7022f9494224bfc1bbe96e642..451e58f779665ce91500297dada321919f0572dd 100644 (file)
@@ -34,7 +34,7 @@ public:
 
   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::CalculateNumChildren() {
 }
 
 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 3720560de59732fca21ef8884d9f398f4978f7af..c066c6ca3475184398440310aefba447a8029171 100644 (file)
@@ -935,7 +935,7 @@ public:
 
   bool MightHaveChildren() override { return false; }
 
-  size_t GetIndexOfChildWithName(const ConstString &name) override {
+  size_t GetIndexOfChildWithName(ConstString name) override {
     return UINT32_MAX;
   }
 };
index 9eec28bd2dc3bc18e94cb9f68f0d04e3a67881fc..ab1da08df383f8685b0db2cf927699128d08ccc4 100644 (file)
@@ -57,7 +57,7 @@ public:
 
   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 @@ public:
 
   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 @@ public:
 
   bool MightHaveChildren() override;
 
-  size_t GetIndexOfChildWithName(const ConstString &name) override;
+  size_t GetIndexOfChildWithName(ConstString name) override;
 };
 
 class NSArray1SyntheticFrontEnd : public SyntheticChildrenFrontEnd {
@@ -331,7 +331,7 @@ public:
 
   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 @@ lldb_private::formatters::NSArrayMSyntheticFrontEndBase::MightHaveChildren() {
 
 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 @@ lldb_private::formatters::GenericNSArrayISyntheticFrontEnd<D32, D64, Inline>::
 template <typename D32, typename D64, bool Inline>
 size_t
 lldb_private::formatters::GenericNSArrayISyntheticFrontEnd<D32, D64, Inline>::
-  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 @@ lldb_private::formatters::NSArray0SyntheticFrontEnd::NSArray0SyntheticFrontEnd(
 
 size_t
 lldb_private::formatters::NSArray0SyntheticFrontEnd::GetIndexOfChildWithName(
-    const ConstString &name) {
+    ConstString name) {
   return UINT32_MAX;
 }
 
@@ -752,7 +752,7 @@ lldb_private::formatters::NSArray1SyntheticFrontEnd::NSArray1SyntheticFrontEnd(
 
 size_t
 lldb_private::formatters::NSArray1SyntheticFrontEnd::GetIndexOfChildWithName(
-    const ConstString &name) {
+    ConstString name) {
   static const ConstString g_zero("[0]");
 
   if (name == g_zero)
index 61e9de28b0e5164dbf127956ebedf95960171265..61eff29618599a30929a48f5827593f2bd1f2482 100644 (file)
@@ -111,7 +111,7 @@ public:
 
   bool MightHaveChildren() override;
 
-  size_t GetIndexOfChildWithName(const ConstString &name) override;
+  size_t GetIndexOfChildWithName(ConstString name) override;
 
 private:
   struct DataDescriptor_32 {
@@ -154,7 +154,7 @@ public:
 
   bool MightHaveChildren() override;
 
-  size_t GetIndexOfChildWithName(const ConstString &name) override;
+  size_t GetIndexOfChildWithName(ConstString name) override;
 
 private:
   ValueObjectSP m_pair;
@@ -175,7 +175,7 @@ public:
 
   bool MightHaveChildren() override;
 
-  size_t GetIndexOfChildWithName(const ConstString &name) override;
+  size_t GetIndexOfChildWithName(ConstString name) override;
 
 private:
   struct DictionaryItemDescriptor {
@@ -208,7 +208,7 @@ namespace Foundation1100 {
     
     bool MightHaveChildren() override;
     
-    size_t GetIndexOfChildWithName(const ConstString &name) override;
+    size_t GetIndexOfChildWithName(ConstString name) override;
     
   private:
     struct DataDescriptor_32 {
@@ -512,7 +512,7 @@ lldb_private::formatters::NSDictionaryISyntheticFrontEnd::
 }
 
 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 @@ lldb_private::formatters::NSDictionary1SyntheticFrontEnd::
     : 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 @@ lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd<D32,D64>::
 
 template <typename D32, typename D64>
 size_t
-lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd<D32,D64>::    GetIndexOfChildWithName(const ConstString &name) {
+lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd<D32,D64>::    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 @@ lldb_private::formatters::Foundation1100::
 
 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 f7a20b6cd3bdf677940b37da7ed19e5a66329c5a..9e10262526000ec8c51df7616eabd7d9e15e72c9 100644 (file)
@@ -163,7 +163,7 @@ public:
 
   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 e24028dd79a29ae6068fd73f6804c8bc660c7886..5f2ec4e7d3b92fd7ab9e269ebd6b864feefea9a1 100644 (file)
@@ -149,7 +149,7 @@ public:
 
   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 660344c4f8776df36b04ac199c315db98befb10b..2fe042f4ffd50b053a97078fe49e7903cccfa71c 100644 (file)
@@ -127,7 +127,7 @@ public:
 
   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 c824d6e2e43f260cfa534a05f3c528097ffbd0ec..96f616173ac329baa580c65db88a3f58db5a440e 100644 (file)
@@ -54,7 +54,7 @@ public:
 
   bool MightHaveChildren() override;
 
-  size_t GetIndexOfChildWithName(const ConstString &name) override;
+  size_t GetIndexOfChildWithName(ConstString name) override;
 
 private:
   struct DataDescriptor_32 {
@@ -95,7 +95,7 @@ public:
 
   bool MightHaveChildren() override;
 
-  size_t GetIndexOfChildWithName(const ConstString &name) override;
+  size_t GetIndexOfChildWithName(ConstString name) override;
 
 private:
 
@@ -211,7 +211,7 @@ public:
 
   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 @@ lldb_private::formatters::NSSetISyntheticFrontEnd::~NSSetISyntheticFrontEnd() {
 
 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 @@ template <typename D32, typename D64>
 size_t
 lldb_private::formatters::
   GenericNSSetMSyntheticFrontEnd<D32, D64>::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 3ec821dd51267bfb1acca623a6f037cb34e5f3c2..29ee16845cf4181c7d4a68082f961a5294b2bdff 100644 (file)
@@ -119,7 +119,7 @@ bool ObjCLanguage::MethodName::SetName(const char *name, bool strict) {
   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 @@ const ConstString &ObjCLanguage::MethodName::GetClassName() {
   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 @@ const ConstString &ObjCLanguage::MethodName::GetClassNameWithCategory() {
   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 @@ const ConstString &ObjCLanguage::MethodName::GetSelector() {
   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 @@ size_t ObjCLanguage::MethodName::GetFullNames(std::vector<ConstString> &names,
     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 @@ size_t ObjCLanguage::MethodName::GetFullNames(std::vector<ConstString> &names,
         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 efb53dcbbd09347ee925adda96098c782ac4d663..aed867e2e36df9f31e8ee7be4676313acbd23b79 100644 (file)
@@ -58,20 +58,20 @@ public:
 
     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 fba03e84ed2d048a6245434b1e5abea4fa656ca3..6b51177437c6adaaa641d2a85a7e8f40c422c05c 100644 (file)
@@ -175,7 +175,7 @@ AppleObjCDeclVendor::GetDeclForISA(ObjCLanguageRuntime::ObjCISA isa) {
   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 @@ bool AppleObjCDeclVendor::FinishDecl(clang::ObjCInterfaceDecl *interface_decl) {
 }
 
 uint32_t
-AppleObjCDeclVendor::FindDecls(const ConstString &name, bool append,
+AppleObjCDeclVendor::FindDecls(ConstString name, bool append,
                                uint32_t max_matches,
                                std::vector<clang::NamedDecl *> &decls) {
   static unsigned int invocation_id = 0;
index d243ab298b6ea59d0dce58bd2e990d53975e00d3..41e211f3bb98430868a208c72d95f29f686c18ef 100644 (file)
@@ -22,7 +22,7 @@ class AppleObjCDeclVendor : public DeclVendor {
 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<clang::NamedDecl *> &decls) override;
 
   clang::ExternalASTMerger::ImporterSource GetImporterSource() override;
index 3408ad6b63138a92f7b52367d96ce797ef2c052b..484107293df3b7ce155db4ed6d5174b74344ef8a 100644 (file)
@@ -1951,7 +1951,7 @@ DeclVendor *AppleObjCRuntimeV2::GetDeclVendor() {
   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 1129309cb26666e2698ca08a8950c0a9bc113165..5a4fc6970ab064c1fb1762843df71b5edda7a7a4 100644 (file)
@@ -79,7 +79,7 @@ public:
 
   DeclVendor *GetDeclVendor() override;
 
-  lldb::addr_t LookupRuntimeSymbol(const ConstString &name) override;
+  lldb::addr_t LookupRuntimeSymbol(ConstString name) override;
 
   EncodingToTypeSP GetEncodingToType() override;
 
index 7dd3b87a3a04ce6c13f2141c677dad0ecd2ac0ee..81551e713aa5c60571dc16d3b90279bafd5b7f3f 100644 (file)
@@ -592,7 +592,7 @@ struct RenderScriptRuntime::Element {
       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 @@ struct RenderScriptRuntime::AllocationDetails {
   }
 };
 
-const ConstString &RenderScriptRuntime::Element::GetFallbackStructName() {
+ConstString RenderScriptRuntime::Element::GetFallbackStructName() {
   static const ConstString FallbackStructName("struct");
   return FallbackStructName;
 }
@@ -2363,7 +2363,7 @@ void RenderScriptRuntime::FindStructTypeName(Element &elem,
                     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 @@ void RenderScriptRuntime::SetBreakAllKernels(bool do_break, TargetSP target) {
 // 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 @@ RenderScriptRuntime::CreateKernelBreakpoint(const ConstString &name) {
 }
 
 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 @@ bool RenderScriptRuntime::PlaceBreakpointOnKernel(TargetSP target,
 }
 
 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 @@ RenderScriptRuntime::CreateScriptGroupBreakpoint(const ConstString &name,
 
 bool RenderScriptRuntime::PlaceBreakpointOnScriptGroup(TargetSP target,
                                                        Stream &strm,
-                                                       const ConstString &name,
+                                                       ConstString name,
                                                        bool multi) {
   InitSearchFilter(target);
   BreakpointSP bp = CreateScriptGroupBreakpoint(name, multi);
index 71d726097f892b98276bb52b7193bc19bee0c8b4..d416b9232861099667659cf0a29dbd321e022a63 100644 (file)
@@ -245,7 +245,7 @@ typedef std::vector<RSScriptGroupDescriptorSP> RSScriptGroupList;
 
 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 @@ public:
 
 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 @@ public:
       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 @@ public:
     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 @@ protected:
   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 50e474917d761a5510eb2bd4f68eca7a0bb1586a..a52c00107c1e4f9a57b83ee9f5056299a4440f24 100644 (file)
@@ -169,7 +169,7 @@ size_t ObjectContainerBSDArchive::Archive::ParseObjects() {
 
 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 868f505699f51b2744a0cc883896e1e68bffcadd..13afb98fa72002cc07f9b23686d6e3b21b714fc3 100644 (file)
@@ -136,7 +136,7 @@ protected:
 
     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 7ea60303e1b33b6f50ddc2627d23311fa18bbd87..ca2da5a72a5ecaddb3ec26252074637d5ee00b9c 100644 (file)
@@ -2176,7 +2176,7 @@ unsigned ObjectFileELF::ParseSymbols(Symtab *symtab, user_id_t start_id,
 
     if (symbol_type == eSymbolTypeInvalid && symbol.getType() != STT_SECTION) {
       if (symbol_section_sp) {
-        const ConstString &sect_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 @@ unsigned ObjectFileELF::ParseSymbols(Symtab *symtab, user_id_t start_id,
 
     if (symbol_section_sp && module_section_list &&
         module_section_list != section_list) {
-      const ConstString &sect_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 64f39f47ed9db7f48aa435728ae38bb861f495b7..7d5386bb7f8de2723025e5bab72690e640d4d35a 100644 (file)
@@ -927,42 +927,42 @@ size_t ObjectFileMachO::GetModuleSpecifications(
   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 @@ size_t ObjectFileMachO::ParseSymtab() {
       }
     }
 
-    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 83f382c70c575d5e5d3f317ddfeb78e43abc3216..527acae3cc192927090f5f4ce027ba978777fd92 100644 (file)
@@ -193,14 +193,14 @@ protected:
   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<llvm::MachO::segment_command_64> m_mach_segments;
index 63348c3b7d6d77c235b83e13c81a5da4c4579cac..f59d0374f634e808b49174fd3639d95f0f04ad5a 100644 (file)
@@ -746,7 +746,7 @@ void DynamicRegisterInfo::Dump() const {
 }
 
 const lldb_private::RegisterInfo *DynamicRegisterInfo::GetRegisterInfo(
-    const lldb_private::ConstString &reg_name) const {
+    lldb_private::ConstString reg_name) const {
   for (auto &reg_info : m_regs) {
     // We can use pointer comparison since we used a ConstString to set the
     // "name" member in AddRegister()
index e78da95e1b91ec9229e33822c8341d0839a97171..116224a1af63b652a1a27ee748926c67cae4fcc7 100644 (file)
@@ -77,7 +77,7 @@ protected:
   typedef std::map<uint32_t, dwarf_opcode> dynamic_reg_size_map;
 
   const lldb_private::RegisterInfo *
-  GetRegisterInfo(const lldb_private::ConstString &reg_name) const;
+  GetRegisterInfo(lldb_private::ConstString reg_name) const;
 
   void MoveFrom(DynamicRegisterInfo &&info);
 
index afa8e9c37ad0e0b3b5f4d560f66d7f87fe9648d1..33c0e0d5e5c407f0d30da9c64f736ef6c7149c3f 100644 (file)
@@ -3954,7 +3954,7 @@ Status GDBRemoteCommunicationClient::SendSignalsToIgnore(
 }
 
 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 3ab215657cd3f59ba70d7aa8b628ab7f0b82a86a..84e2c2af747b003372a481aa3fea8da205535f44 100644 (file)
@@ -496,7 +496,7 @@ public:
   /// @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 f5b787d161050c5f12bf3bd2e4625138a6487bbc..1b9c5d610d514ea1c59d358cc720964f6de9e9be 100644 (file)
@@ -4213,7 +4213,7 @@ StructuredData::ObjectSP ProcessGDBRemote::GetSharedCacheInfo() {
 }
 
 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 aa9aff5549f3eca9349cf6ebe811bc301c3badc9..efa7d28f178846ddaff898f5cd0d5a7883ae9255 100644 (file)
@@ -234,7 +234,7 @@ public:
                                  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 4cd8f0a4144890cc227dd0da4ef94757b31e2aef..3ab50613c565875d6751f0bcfcba2e7e0497d8ef 100644 (file)
@@ -187,12 +187,12 @@ const char *const s_filter_attributes[] = {
     // 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 @@ public:
       std::function<FilterRuleSP(bool accept, size_t attribute_index,
                                  const std::string &op_arg, Status &error)>;
 
-  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 @@ public:
 
   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 @@ private:
     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 @@ private:
         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 @@ protected:
           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 @@ void StructuredDataDarwinLog::Terminate() {
   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 @@ uint32_t StructuredDataDarwinLog::GetPluginVersion() { return 1; }
 // -----------------------------------------------------------------------------
 
 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 @@ Status StructuredDataDarwinLog::GetDescription(
   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 8571662e53fd6d480bcbd45df418b704adf480e5..f9ddb040c407b2878921c2092e601e00b325d2be 100644 (file)
@@ -32,7 +32,7 @@ public:
 
   static void Terminate();
 
-  static const ConstString &GetStaticPluginName();
+  static ConstString GetStaticPluginName();
 
   // -------------------------------------------------------------------------
   /// Return whether the DarwinLog functionality is enabled.
@@ -60,16 +60,16 @@ public:
   // 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 ec50f9bc2d953006180d9d9b0453ad296c0feebc..9057c2a8d3cd854cf1dc3f2aca1296ff73f8c821 100644 (file)
@@ -286,7 +286,7 @@ uint32_t SymbolFileBreakpad::ResolveSymbolContext(
 }
 
 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::FindFunctions(const RegularExpression &regex,
 }
 
 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<SymbolFile *> &searched_symbol_files, TypeMap &types) {
   if (!append)
index ef3073b341d5d6ccfe5e7def6ec221d25512b3bc..42bb118643756d53464859b09a316d06507281f3 100644 (file)
@@ -77,7 +77,7 @@ public:
 
   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 @@ public:
     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 @@ public:
   uint32_t FindFunctions(const RegularExpression &regex, 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<SymbolFile *> &searched_symbol_files,
@@ -132,7 +132,7 @@ public:
   }
 
   CompilerDeclContext
-  FindNamespace(const ConstString &name,
+  FindNamespace(ConstString name,
                 const CompilerDeclContext *parent_decl_ctx) override {
     return CompilerDeclContext();
   }
index 6a47a2ae0e7a1c39c3b9d26d258caa3524cb79f1..6710ae1f2c6d02505fe30cdebe41dfa1d0f195c0 100644 (file)
@@ -25,11 +25,11 @@ void NameToDIE::Finalize() {
   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 e969f27e348c8093fd6d571d09767c532eaaf13f..2d7b4605247aeb9fb45ea3e1664a4d3491b038ff 100644 (file)
@@ -26,13 +26,13 @@ public:
 
   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 &regex,
index 734f066b836e2dc107341a7fa9bdbae2289e920c..05cc4ef367e7de8bcb5d733fd39576054512a528 100644 (file)
@@ -367,7 +367,7 @@ SymbolFileDWARF::SymbolFileDWARF(ObjectFile *objfile)
 
 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 @@ bool SymbolFileDWARF::DeclContextMatchesThisSymbolFile(
 }
 
 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 @@ bool SymbolFileDWARF::DIEInDeclContext(const CompilerDeclContext *decl_ctx,
 }
 
 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 @@ void SymbolFileDWARF::GetMangledNamesForFunction(
 }
 
 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<lldb_private::SymbolFile *> &searched_symbol_files,
     TypeMap &types) {
@@ -2540,7 +2540,7 @@ size_t SymbolFileDWARF::FindTypes(const std::vector<CompilerContext> &context,
 }
 
 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 @@ SymbolFileDWARF::GetDeclContextDIEContainingDIE(const DWARFDIE &orig_die) {
 }
 
 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 @@ bool SymbolFileDWARF::Supports_DW_AT_APPLE_objc_complete_type(
 // 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 7ac344cd23218ba45ca1e9621589e32c2f19ffcd..9fc2015f0ad7070e882533c63bd5d70dfba72dd4 100644 (file)
@@ -169,7 +169,7 @@ public:
                        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 @@ public:
                                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 @@ public:
       std::vector<lldb_private::ConstString> &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<lldb_private::SymbolFile *> &searched_symbol_files,
@@ -212,7 +212,7 @@ public:
   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 @@ protected:
   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 @@ protected:
   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 b27dc49ce992185c9994d854b1c8870dca3c4f69..582565662f7fa68ea7fc3a5d471c1ba5d849a5f3 100644 (file)
@@ -60,13 +60,11 @@ SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap(
     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<void *>(this),
         oso_module->GetSpecificationDescription().c_str());
-  }
 
   std::vector<SymbolFileDWARFDebugMap::CompileUnitInfo *> cu_infos;
   if (exe_symfile->GetCompUnitInfosForModule(oso_module, cu_infos)) {
@@ -810,7 +808,7 @@ uint32_t SymbolFileDWARFDebugMap::ResolveSymbolContext(
 }
 
 uint32_t SymbolFileDWARFDebugMap::PrivateFindGlobalVariables(
-    const ConstString &name, const CompilerDeclContext *parent_decl_ctx,
+    ConstString name, const CompilerDeclContext *parent_decl_ctx,
     const std::vector<uint32_t>
         &indexes, // Indexes into the symbol table that match "name"
     uint32_t max_matches, VariableList &variables) {
@@ -834,7 +832,7 @@ uint32_t SymbolFileDWARFDebugMap::PrivateFindGlobalVariables(
 }
 
 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 @@ static void RemoveFunctionsWithModuleNotEqualTo(const ModuleSP &module_sp,
 }
 
 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 @@ bool SymbolFileDWARFDebugMap::Supports_DW_AT_APPLE_objc_complete_type(
 }
 
 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 @@ TypeSP SymbolFileDWARFDebugMap::FindCompleteObjCDefinitionTypeForDIE(
 }
 
 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<lldb_private::SymbolFile *> &searched_symbol_files,
     TypeMap &types) {
@@ -1212,7 +1210,7 @@ uint32_t SymbolFileDWARFDebugMap::FindTypes(
 //}
 
 CompilerDeclContext SymbolFileDWARFDebugMap::FindNamespace(
-    const lldb_private::ConstString &name,
+    lldb_private::ConstString name,
     const CompilerDeclContext *parent_decl_ctx) {
   CompilerDeclContext matching_namespace;
 
index aabea2c30d649df63c408c85e96548e1c44a575e..5139fffe6722bc48c5447c542a80c62c3faba8f8 100644 (file)
@@ -98,7 +98,7 @@ public:
                        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 @@ public:
                                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 @@ public:
                          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<lldb_private::SymbolFile *> &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 @@ protected:
                                         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<uint32_t> &name_symbol_indexes, uint32_t max_matches,
       lldb_private::VariableList &variables);
@@ -264,7 +264,7 @@ protected:
   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 07b458ca0c768cb909209cae8080d32d9580a39c..9d118d63dba5aae75f66eb4a6a87590d447626a1 100644 (file)
@@ -107,7 +107,7 @@ lldb::TypeSP SymbolFileDWARFDwo::FindDefinitionTypeForDWARFDeclContext(
 }
 
 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 75363ac6e2cbd5c08e918a31604b2503cede4f2d..c73d16ffa995d56d71eb4ea1f3f1e7e94500ee20 100644 (file)
@@ -69,7 +69,7 @@ protected:
       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 bda65e2f375f977eb8612c61e496f095af9c623a..06e11941ecabaa270d86421e97c1691d04b0dedd 100644 (file)
@@ -80,12 +80,12 @@ public:
 
   ~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 6939f34b44c58e7c72431f7069a15886da32e9f2..ff6fffb42d86eb19bb4d01b7ed353a95bcd9514e 100644 (file)
@@ -1150,7 +1150,7 @@ size_t SymbolFileNativePDB::ParseBlocksRecursive(Function &func) {
 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<uint32_t, llvm::codeview::CVSymbol>;
 
@@ -1177,7 +1177,7 @@ uint32_t SymbolFileNativePDB::FindGlobalVariables(
 }
 
 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::FindFunctions(const RegularExpression &regex,
 }
 
 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<SymbolFile *> &searched_symbol_files, TypeMap &types) {
   if (!append)
@@ -1550,7 +1550,7 @@ size_t SymbolFileNativePDB::GetTypes(lldb_private::SymbolContextScope *sc_scope,
 }
 
 CompilerDeclContext
-SymbolFileNativePDB::FindNamespace(const ConstString &name,
+SymbolFileNativePDB::FindNamespace(ConstString name,
                                    const CompilerDeclContext *parent_decl_ctx) {
   return {};
 }
index 1264244b622f9222946351657e2c74e1ab03e64b..54cb4429c155e89a1003680a64c31a9c0ccfba47 100644 (file)
@@ -100,7 +100,7 @@ public:
 
   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 @@ public:
   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 @@ public:
   uint32_t FindFunctions(const RegularExpression &regex, 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<SymbolFile *> &searched_symbol_files,
@@ -150,7 +150,7 @@ public:
   TypeSystem *GetTypeSystemForLanguage(lldb::LanguageType language) override;
 
   CompilerDeclContext
-  FindNamespace(const ConstString &name,
+  FindNamespace(ConstString name,
                 const CompilerDeclContext *parent_decl_ctx) override;
 
   ConstString GetPluginName() override;
index 84b9e7f86b39d9f645f3d5c8bff91666e39ffb91..30c8f9fb073da96e35267c1d919c4eeca0bab8c4 100644 (file)
@@ -1046,7 +1046,7 @@ SymbolFilePDB::ParseVariables(const lldb_private::SymbolContext &sc,
 }
 
 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 @@ void SymbolFilePDB::CacheFunctionNames() {
 }
 
 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 @@ void SymbolFilePDB::AddSymbols(lldb_private::Symtab &symtab) {
 }
 
 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<lldb_private::SymbolFile *> &searched_symbol_files,
@@ -1628,7 +1628,7 @@ PDBASTParser *SymbolFilePDB::GetPDBAstParser() {
 
 
 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<ClangASTContext>(type_system);
index e3b0931750712c97191a16dce0c6bf2f6344420d..72713aa0ba2356e9f9dbc2e3e609376f52baf3e3 100644 (file)
@@ -110,7 +110,7 @@ public:
                        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 @@ public:
                                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 @@ public:
   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<lldb_private::SymbolFile *> &searched_symbol_files,
@@ -158,7 +158,7 @@ public:
   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 8184f7c024c5072b698de1daaaf6736306582ec6..b5fcc9bcd8cf6e9c6027cc7f32e9ef7422da2bc2 100644 (file)
@@ -1065,7 +1065,7 @@ CompilerType ClangASTContext::GetBuiltinTypeForEncodingAndBitSize(
 }
 
 lldb::BasicType
-ClangASTContext::GetBasicTypeEnumeration(const ConstString &name) {
+ClangASTContext::GetBasicTypeEnumeration(ConstString name) {
   if (name) {
     typedef UniqueCStringMap<lldb::BasicType> TypeNameToBasicTypeMap;
     static TypeNameToBasicTypeMap g_type_map;
@@ -1131,7 +1131,7 @@ ClangASTContext::GetBasicTypeEnumeration(const ConstString &name) {
 }
 
 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::CreateArrayType(const CompilerType &element_type,
 }
 
 CompilerType ClangASTContext::CreateStructForIdentifier(
-    const ConstString &type_name,
+    ConstString type_name,
     const std::initializer_list<std::pair<const char *, CompilerType>>
         &type_fields,
     bool packed) {
@@ -2297,7 +2297,7 @@ CompilerType ClangASTContext::CreateStructForIdentifier(
 }
 
 CompilerType ClangASTContext::GetOrCreateStructForIdentifier(
-    const ConstString &type_name,
+    ConstString type_name,
     const std::initializer_list<std::pair<const char *, CompilerType>>
         &type_fields,
     bool packed) {
@@ -5739,7 +5739,7 @@ uint32_t ClangASTContext::GetNumChildren(lldb::opaque_compiler_type_t type,
   return num_children;
 }
 
-CompilerType ClangASTContext::GetBuiltinTypeByName(const ConstString &name) {
+CompilerType ClangASTContext::GetBuiltinTypeByName(ConstString name) {
   return GetBasicType(GetBasicTypeEnumeration(name));
 }
 
@@ -5819,7 +5819,7 @@ ClangASTContext::GetBasicTypeEnumeration(lldb::opaque_compiler_type_t type) {
 void ClangASTContext::ForEachEnumerator(
     lldb::opaque_compiler_type_t type,
     std::function<bool(const CompilerType &integer_type,
-                       const ConstString &name,
+                       ConstString name,
                        const llvm::APSInt &value)> const &callback) {
   const clang::EnumType *enum_type =
       llvm::dyn_cast<clang::EnumType>(GetCanonicalQualType(type));
index 71390e5a06e682fbab526b6180b4cecf27cb68ec..80b5583cb837f055e8db6e66938b2c8710002485 100644 (file)
@@ -553,7 +553,7 @@ lldb::BasicType CompilerType::GetBasicTypeEnumeration() const {
 
 void CompilerType::ForEachEnumerator(
     std::function<bool(const CompilerType &integer_type,
-                       const ConstString &name,
+                       ConstString name,
                        const llvm::APSInt &value)> const &callback) const {
   if (IsValid())
     return m_type_system->ForEachEnumerator(m_type, callback);
index a7f32d30b076c7334d6928c429b1968923dda0e8..d7df70baf7fd91c467232f8f863c0b9c77813622 100644 (file)
@@ -31,7 +31,7 @@ using namespace lldb_private;
 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 @@ InlineFunctionInfo::InlineFunctionInfo(const char *name, const char *mangled,
     : 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 2a4d49cfbaf16b83bd09c56564d7a8f7eff61602..07054ee5cf727a3a0491e8f98482058d4a7c955d 100644 (file)
@@ -270,7 +270,7 @@ Symbols::LocateExecutableSymbolFile(const ModuleSpec &module_spec,
     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 f15b05a355897b4dc4e13c362c44f609e1e61f3c..6e9bfe75aad9c4d405fb315cc816b9571e20d7bb 100644 (file)
@@ -145,7 +145,7 @@ FileSpec Symbol::GetReExportedSymbolSharedLibrary() const {
   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 @@ uint32_t Symbol::GetPrologueByteSize() {
   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 bc014a7728822c20fe39f261b3edfd12a5fc940e..292830edb93c46d68b84d8045c27bd2a408df572 100644 (file)
@@ -793,7 +793,7 @@ bool SymbolContext::GetAddressRangeFromHereToEndLine(uint32_t end_line,
 }
 
 const Symbol *
-SymbolContext::FindBestGlobalDataSymbol(const ConstString &name, Status &error) {
+SymbolContext::FindBestGlobalDataSymbol(ConstString name, Status &error) {
   error.Clear();
 
   if (!target_sp) {
index 85242aeacb1f6ac773a9f6b03e882ea3ba2bfa90..e55b997b5136c7277ae4611960c66f0bcbce742f 100644 (file)
@@ -102,7 +102,7 @@ uint32_t SymbolFile::ResolveSymbolContext(const FileSpec &file_spec,
 }
 
 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 @@ uint32_t SymbolFile::FindGlobalVariables(const RegularExpression &regex,
   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 @@ void SymbolFile::GetMangledNamesForFunction(
 }
 
 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<lldb_private::SymbolFile *> &searched_symbol_files,
     TypeMap &types) {
index fd148a4aac85f8220e4b83623cd858b949234a3c..112d487d1fa9a6bfbbc6766d519b08b5b417dfb6 100644 (file)
@@ -262,7 +262,7 @@ uint32_t SymbolVendor::ResolveSymbolContext(const FileSpec &file_spec,
 }
 
 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 @@ size_t SymbolVendor::FindGlobalVariables(const RegularExpression &regex,
   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::FindFunctions(const RegularExpression &regex,
 }
 
 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<lldb_private::SymbolFile *> &searched_symbol_files,
     TypeMap &types) {
@@ -358,7 +358,7 @@ size_t SymbolVendor::GetTypes(SymbolContextScope *sc_scope, TypeClass type_mask,
 }
 
 CompilerDeclContext
-SymbolVendor::FindNamespace(const ConstString &name,
+SymbolVendor::FindNamespace(ConstString name,
                             const CompilerDeclContext *parent_decl_ctx) {
   CompilerDeclContext namespace_decl_ctx;
   ModuleSP module_sp(GetModule());
index 6332d73c2a68e2bad6f6b81a711e06f93369d7ae..b04028c438a848360635727442251b18b7191d40 100644 (file)
@@ -625,7 +625,7 @@ void Symtab::SortSymbolIndexesByValue(std::vector<uint32_t> &indexes,
   }
 }
 
-uint32_t Symtab::AppendSymbolIndexesWithName(const ConstString &symbol_name,
+uint32_t Symtab::AppendSymbolIndexesWithName(ConstString symbol_name,
                                              std::vector<uint32_t> &indexes) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
 
@@ -640,7 +640,7 @@ uint32_t Symtab::AppendSymbolIndexesWithName(const ConstString &symbol_name,
   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<uint32_t> &indexes) {
@@ -667,7 +667,7 @@ uint32_t Symtab::AppendSymbolIndexesWithName(const ConstString &symbol_name,
 }
 
 uint32_t
-Symtab::AppendSymbolIndexesWithNameAndType(const ConstString &symbol_name,
+Symtab::AppendSymbolIndexesWithNameAndType(ConstString symbol_name,
                                            SymbolType symbol_type,
                                            std::vector<uint32_t> &indexes) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
@@ -686,7 +686,7 @@ Symtab::AppendSymbolIndexesWithNameAndType(const ConstString &symbol_name,
 }
 
 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<uint32_t> &indexes) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
@@ -771,7 +771,7 @@ Symbol *Symtab::FindSymbolWithType(SymbolType symbol_type,
 }
 
 size_t
-Symtab::FindAllSymbolsWithNameAndType(const ConstString &name,
+Symtab::FindAllSymbolsWithNameAndType(ConstString name,
                                       SymbolType symbol_type,
                                       std::vector<uint32_t> &symbol_indexes) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
@@ -792,7 +792,7 @@ Symtab::FindAllSymbolsWithNameAndType(const ConstString &name,
 }
 
 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<uint32_t> &symbol_indexes) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
 
@@ -823,7 +823,7 @@ size_t Symtab::FindAllSymbolsMatchingRexExAndType(
   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 @@ void Symtab::SymbolIndicesToSymbolContextList(
   }
 }
 
-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 43d039bfcaa8a3b7813116801046c53769ca0f16..63356ab99987bf3e344d4e4660430c02e11063ba 100644 (file)
@@ -107,7 +107,7 @@ Type *SymbolFileType::GetType() {
 }
 
 Type::Type(lldb::user_id_t uid, SymbolFile *symbol_file,
-           const ConstString &name, llvm::Optional<uint64_t> byte_size,
+           ConstString name, llvm::Optional<uint64_t> byte_size,
            SymbolContextScope *context, user_id_t encoding_uid,
            EncodingDataType encoding_uid_type, const Declaration &decl,
            const CompilerType &compiler_type,
@@ -153,7 +153,7 @@ void Type::GetDescription(Stream *s, lldb::DescriptionLevel level,
 
   // 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 @@ void Type::Dump(Stream *s, bool show_context) {
   s->EOL();
 }
 
-const ConstString &Type::GetName() {
+ConstString Type::GetName() {
   if (!m_name)
     m_name = GetForwardCompilerType().GetConstTypeName();
   return m_name;
@@ -734,7 +734,7 @@ ConstString TypeAndOrName::GetName() const {
   return ConstString("<invalid>");
 }
 
-void TypeAndOrName::SetName(const ConstString &type_name) {
+void TypeAndOrName::SetName(ConstString type_name) {
   m_type_name = type_name;
 }
 
@@ -1104,7 +1104,7 @@ CompilerType TypeMemberFunctionImpl::GetArgumentAtIndex(size_t idx) const {
 }
 
 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 7cc604b13ce146605bff12291df88378938001b9..480b5530d1c880d35424727b2df1779ac5aa09dc 100644 (file)
@@ -49,7 +49,7 @@ void TypeList::Insert(const TypeSP &type_sp) {
 // 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 641bc95a4517c7d59a78272b7fe687a291dda440..010c937177f78b974525c9f9c7b850efaa282187 100644 (file)
@@ -77,7 +77,7 @@ bool TypeMap::InsertUnique(const TypeSP &type_sp) {
 // 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 d1b6f16a99dbc2a4dccc24f6514146ac9dc7c80b..fb9c8e71acb35d0a51ff85c6ff9f30225b4997f1 100644 (file)
@@ -92,7 +92,7 @@ CompilerType TypeSystem::CreateTypedef(lldb::opaque_compiler_type_t type,
   return CompilerType();
 }
 
-CompilerType TypeSystem::GetBuiltinTypeByName(const ConstString &name) {
+CompilerType TypeSystem::GetBuiltinTypeByName(ConstString name) {
   return CompilerType();
 }
 
index e4cb36bf4a03194c7307123183d270af0d7b1da2..ceb127d1696a51f798f6932e3c528ccbca4f2dc9 100644 (file)
@@ -74,7 +74,7 @@ ConstString Variable::GetName() const {
 
 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 5dce9a0b8f51d637cf3df6941e6e5270cd6047dd..f8a7e7a74097ab07050772de86201b78d1e8a2e0 100644 (file)
@@ -73,7 +73,7 @@ uint32_t VariableList::FindVariableIndex(const VariableSP &var_sp) {
   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 @@ VariableSP VariableList::FindVariable(const ConstString &name,
   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 47ec1061d02ca332f89a579e7bd250b903879369..d1fc274e2ed461283b6a77d0bfb337a7cc988035 100644 (file)
@@ -39,7 +39,7 @@ ABI::FindPlugin(lldb::ProcessSP process_sp, const ArchSpec &arch) {
 
 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 fac1fae68dca5c1e0af0439a79dc46eb0c1dbbb3..cd97707ccfa768680b02c9f747a4328e962ff1aa 100644 (file)
@@ -153,7 +153,7 @@ bool ObjCLanguageRuntime::ClassDescriptor::IsPointerValid(
 }
 
 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::GetISA(const ConstString &name) {
 }
 
 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::GetActualTypeName(ObjCLanguageRuntime::ObjCISA isa) {
 
 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 cbbc7c4d01b54969a7296374390307f233bda376..3c07b809174202d5dc72a261b232142298154d84 100644 (file)
@@ -30,7 +30,7 @@ namespace {
   // 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 @@ const PathMappingList &PathMappingList::operator=(const PathMappingList &rhs) {
 
 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::Append(const PathMappingList &rhs, bool notify) {
   }
 }
 
-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 @@ void PathMappingList::Insert(const ConstString &path,
     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 @@ void PathMappingList::Clear(bool notify) {
     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 @@ bool PathMappingList::FindFile(const FileSpec &orig_spec,
   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 @@ bool PathMappingList::Replace(const ConstString &path,
   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 @@ bool PathMappingList::Remove(const ConstString &path, bool notify) {
 }
 
 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::FindIteratorForPath(const ConstString &path) const {
 }
 
 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 @@ bool PathMappingList::GetPathsAtIndex(uint32_t idx, ConstString &path,
   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 6dab52390fcb2c055ff291566834970bbfb451b1..79ef63881359b5369f303d8b8467797cc76c86f5 100644 (file)
@@ -180,7 +180,7 @@ Platform::LocateExecutableScriptingResources(Target *target, Module &module,
 }
 
 // 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 @@ bool Platform::GetModuleSpec(const FileSpec &module_file_spec,
                                              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 @@ PlatformSP Platform::Find(const ConstString &name) {
   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 d74aaf1e4e70c59cae16723724a1223a9bbc7167..e76e4872d3ad0e5a91338e7e2fc000ba90804be8 100644 (file)
@@ -84,7 +84,7 @@ using namespace std::chrono;
 
 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(const ProcessSP &process_sp,
 
 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 @@ void Process::BroadcastStructuredData(const StructuredData::ObjectSP &object_sp,
 }
 
 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 @@ Process::GetMemoryRegions(lldb_private::MemoryRegionInfos &region_list) {
 }
 
 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 b6ba3126f36c6b140b69acfe032758a18c489337..47ad6a0e4924d67c40e300008f15c201a25d5d5c 100644 (file)
@@ -55,7 +55,7 @@ ScriptedStackFrameRecognizer::RecognizeFrame(lldb::StackFrameSP frame) {
 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 @@ StackFrameRecognizerManagerImpl &GetStackFrameRecognizerManagerImpl() {
 }
 
 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 d8fbb54e316e9dc222d8c604fa46359edce04750..842708b58a7fad26eba4a177197273e53a4fa3ae 100644 (file)
@@ -32,7 +32,7 @@ StructuredDataPlugin::StructuredDataPlugin(const ProcessWP &process_wp)
 
 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 046e878df9ee80f38021cd9d5545cf3c855100af..ec08a2a24c42f96e88a85b750d701cbe3a960dcf 100644 (file)
@@ -701,7 +701,7 @@ void Target::AddBreakpointName(BreakpointName *bp_name) {
   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 @@ BreakpointName *Target::FindBreakpointName(const ConstString &name,
 }
 
 void
-Target::DeleteBreakpointName(const ConstString &name)
+Target::DeleteBreakpointName(ConstString name)
 {
   BreakpointNameList::iterator iter = m_breakpoint_names.find(name);
   
@@ -739,7 +739,7 @@ Target::DeleteBreakpointName(const ConstString &name)
 }
 
 void Target::RemoveNameFromBreakpoint(lldb::BreakpointSP &bp_sp,
-                                const ConstString &name)
+                                ConstString name)
 {
   bp_sp->RemoveName(name.AsCString());
 }
@@ -2414,7 +2414,7 @@ ExpressionResults Target::EvaluateExpression(
 }
 
 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 @@ Target::GetPersistentVariable(const ConstString &name) {
   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 @@ enum {
 
 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(const lldb::TargetSP &target_sp,
 
 Target::TargetEventData::~TargetEventData() = default;
 
-const ConstString &Target::TargetEventData::GetFlavorString() {
+ConstString Target::TargetEventData::GetFlavorString() {
   static ConstString g_flavor("Target::TargetEventData");
   return g_flavor;
 }
index 82564f7c5bdc52950c96add0f3942ea0c7343bed..baefff9cedc518f52a8b89599a7a7e3ec1a8e442 100644 (file)
@@ -92,7 +92,7 @@ enum {
 
 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 @@ uint64_t ThreadProperties::GetMaxBacktraceDepth() const {
 // Thread Event Data
 //------------------------------------------------------------------
 
-const ConstString &Thread::ThreadEventData::GetFlavorString() {
+ConstString Thread::ThreadEventData::GetFlavorString() {
   static ConstString g_flavor("Thread::ThreadEventData");
   return g_flavor;
 }
index f53b7d2da472f4173c501e4561753bd1ff822f63..9e835aad0201b93389ec5176597b12a4b44de334 100644 (file)
@@ -763,7 +763,7 @@ llvm::Triple::ArchType ArchSpec::GetMachine() const {
   return llvm::Triple::UnknownArch;
 }
 
-const ConstString &ArchSpec::GetDistributionId() const {
+ConstString ArchSpec::GetDistributionId() const {
   return m_distribution_id;
 }
 
index 7ab98ef5ce7d1da64fa9972a4e4335aef30ed583..9a6e625a670ae7657c93b4a4d5c22a33a918f293 100644 (file)
@@ -206,7 +206,7 @@ ConstString::ConstString(const char *cstr, size_t cstr_len)
 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 @@ bool ConstString::operator<(const ConstString &rhs) const {
   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 @@ size_t ConstString::GetLength() const {
   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 @@ bool ConstString::Equals(const ConstString &lhs, const ConstString &rhs,
   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::SetString(const llvm::StringRef &s) {
 }
 
 void ConstString::SetStringWithMangledCounterpart(llvm::StringRef demangled,
-                                                   const ConstString &mangled) {
+                                                   ConstString mangled) {
   m_string = StringPool().GetConstCStringAndSetMangledCounterPart(
       demangled, mangled.m_string);
 }
index f6256f7ca407064d218dc7f707492d8e81a57005..9e293db6df612bf75cb2239aaac770aba24616fb 100644 (file)
@@ -120,12 +120,12 @@ EventDataBytes::EventDataBytes(const void *src, size_t src_len) : m_bytes() {
 
 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::~EventDataStructuredData() {}
 // EventDataStructuredData member functions
 //------------------------------------------------------------------
 
-const ConstString &EventDataStructuredData::GetFlavor() const {
+ConstString EventDataStructuredData::GetFlavor() const {
   return EventDataStructuredData::GetFlavorString();
 }
 
@@ -294,7 +294,7 @@ EventDataStructuredData::GetPluginFromEvent(const Event *event_ptr) {
     return StructuredDataPluginSP();
 }
 
-const ConstString &EventDataStructuredData::GetFlavorString() {
+ConstString EventDataStructuredData::GetFlavorString() {
   static ConstString s_flavor("EventDataStructuredData");
   return s_flavor;
 }
index 38ce36a18ac9069716c557e8654636a08a99b933..f877b6f0ef942a9b92d9efac8bf0450ecd7d59db 100644 (file)
@@ -401,7 +401,7 @@ ConstString &FileSpec::GetDirectory() { return m_directory; }
 //------------------------------------------------------------------
 // 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 @@ ConstString &FileSpec::GetFilename() { return m_filename; }
 //------------------------------------------------------------------
 // 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 aeea5d6345a5f8441b22f4f2cac1fb22051da572..5b97fbe923decdfbfd8ff88079e1425e66fd26a6 100644 (file)
@@ -238,7 +238,7 @@ public:
 
     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 4571b84e569cf3f138ac736d3ef7da07a28b9312..a9bef41b2961086cd6e1a70622ac0782917d6da6 100644 (file)
@@ -31,7 +31,7 @@ TEST(MangledTest, ResultForValidName) {
   bool IsMangled = true;
 
   Mangled TheMangled(MangledName, IsMangled);
-  const ConstString &TheDemangled =
+  ConstString TheDemangled =
       TheMangled.GetDemangledName(eLanguageTypeC_plus_plus);
 
   ConstString ExpectedResult("void a::b::c<int, int, int>(unsigned long)");
@@ -43,7 +43,7 @@ TEST(MangledTest, EmptyForInvalidName) {
   bool IsMangled = true;
 
   Mangled TheMangled(MangledName, IsMangled);
-  const ConstString &TheDemangled =
+  ConstString TheDemangled =
       TheMangled.GetDemangledName(eLanguageTypeC_plus_plus);
 
   EXPECT_STREQ("", TheDemangled.GetCString());
index 6f530befc7891803a1c5021b0b256644194a0a88..7d8df7f48464ae30a4a499a67a865bc87492474d 100644 (file)
                                                                </li>
                                                                <li>
                                                                        virtual size_t
-                                                               GetIndexOfChildWithName (const ConstString &amp;name) = 0;
+                                                               GetIndexOfChildWithName (ConstString name) = 0;
                                                                </li>
                                                                <li>
                                                                        virtual bool