aboutsummaryrefslogtreecommitdiff
path: root/lldb/source
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/API/SBType.cpp2
-rw-r--r--lldb/source/Breakpoint/Breakpoint.cpp8
-rw-r--r--lldb/source/Breakpoint/BreakpointName.cpp2
-rw-r--r--lldb/source/Breakpoint/BreakpointResolverName.cpp2
-rw-r--r--lldb/source/Breakpoint/Watchpoint.cpp4
-rw-r--r--lldb/source/Commands/CommandObjectSource.cpp12
-rw-r--r--lldb/source/Commands/CommandObjectType.cpp2
-rw-r--r--lldb/source/Core/Debugger.cpp2
-rw-r--r--lldb/source/Core/Disassembler.cpp2
-rw-r--r--lldb/source/Core/Mangled.cpp14
-rw-r--r--lldb/source/Core/Module.cpp26
-rw-r--r--lldb/source/Core/ModuleList.cpp10
-rw-r--r--lldb/source/Core/PluginManager.cpp144
-rw-r--r--lldb/source/Core/RichManglingContext.cpp4
-rw-r--r--lldb/source/Core/Section.cpp6
-rw-r--r--lldb/source/Core/UserSettingsController.cpp2
-rw-r--r--lldb/source/Core/ValueObject.cpp16
-rw-r--r--lldb/source/Core/ValueObjectCast.cpp4
-rw-r--r--lldb/source/Core/ValueObjectChild.cpp2
-rw-r--r--lldb/source/Core/ValueObjectConstResult.cpp16
-rw-r--r--lldb/source/Core/ValueObjectConstResultCast.cpp2
-rw-r--r--lldb/source/Core/ValueObjectConstResultChild.cpp2
-rw-r--r--lldb/source/Core/ValueObjectRegister.cpp4
-rw-r--r--lldb/source/Core/ValueObjectSyntheticFilter.cpp6
-rw-r--r--lldb/source/DataFormatters/DataVisualization.cpp18
-rw-r--r--lldb/source/DataFormatters/FormatCache.cpp18
-rw-r--r--lldb/source/DataFormatters/FormatManager.cpp4
-rw-r--r--lldb/source/DataFormatters/TypeSynthetic.cpp4
-rw-r--r--lldb/source/DataFormatters/VectorType.cpp2
-rw-r--r--lldb/source/Expression/ExpressionVariable.cpp2
-rw-r--r--lldb/source/Expression/IRExecutionUnit.cpp14
-rw-r--r--lldb/source/Host/common/FileSystem.cpp4
-rw-r--r--lldb/source/Interpreter/OptionValueDictionary.cpp6
-rw-r--r--lldb/source/Interpreter/OptionValueProperties.cpp14
-rw-r--r--lldb/source/Interpreter/Property.cpp2
-rw-r--r--lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp2
-rw-r--r--lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp6
-rw-r--r--lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.h2
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp2
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h2
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp10
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h10
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp4
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h4
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp4
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp6
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h6
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h2
-rw-r--r--lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp2
-rw-r--r--lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.h2
-rw-r--r--lldb/source/Plugins/Language/CPlusPlus/BlockPointer.cpp2
-rw-r--r--lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h4
-rw-r--r--lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp4
-rw-r--r--lldb/source/Plugins/Language/CPlusPlus/LibCxx.h4
-rw-r--r--lldb/source/Plugins/Language/CPlusPlus/LibCxxAtomic.cpp4
-rw-r--r--lldb/source/Plugins/Language/CPlusPlus/LibCxxBitset.cpp2
-rw-r--r--lldb/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp4
-rw-r--r--lldb/source/Plugins/Language/CPlusPlus/LibCxxList.cpp2
-rw-r--r--lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp4
-rw-r--r--lldb/source/Plugins/Language/CPlusPlus/LibCxxOptional.cpp2
-rw-r--r--lldb/source/Plugins/Language/CPlusPlus/LibCxxQueue.cpp2
-rw-r--r--lldb/source/Plugins/Language/CPlusPlus/LibCxxTuple.cpp2
-rw-r--r--lldb/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp4
-rw-r--r--lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp2
-rw-r--r--lldb/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp8
-rw-r--r--lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp10
-rw-r--r--lldb/source/Plugins/Language/CPlusPlus/LibStdcppTuple.cpp4
-rw-r--r--lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp4
-rw-r--r--lldb/source/Plugins/Language/ObjC/Cocoa.cpp2
-rw-r--r--lldb/source/Plugins/Language/ObjC/NSArray.cpp16
-rw-r--r--lldb/source/Plugins/Language/ObjC/NSDictionary.cpp16
-rw-r--r--lldb/source/Plugins/Language/ObjC/NSError.cpp2
-rw-r--r--lldb/source/Plugins/Language/ObjC/NSException.cpp2
-rw-r--r--lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp2
-rw-r--r--lldb/source/Plugins/Language/ObjC/NSSet.cpp10
-rw-r--r--lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp14
-rw-r--r--lldb/source/Plugins/Language/ObjC/ObjCLanguage.h10
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp4
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.h2
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp2
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h2
-rw-r--r--lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp14
-rw-r--r--lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h14
-rw-r--r--lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp2
-rw-r--r--lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h2
-rw-r--r--lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp4
-rw-r--r--lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp28
-rw-r--r--lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h16
-rw-r--r--lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp2
-rw-r--r--lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.h2
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp2
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h2
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp2
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h2
-rw-r--r--lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp26
-rw-r--r--lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h8
-rw-r--r--lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp4
-rw-r--r--lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h8
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp4
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.h4
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp14
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h14
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp16
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h12
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp2
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h2
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.h4
-rw-r--r--lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp8
-rw-r--r--lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h8
-rw-r--r--lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp8
-rw-r--r--lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h8
-rw-r--r--lldb/source/Symbol/ClangASTContext.cpp12
-rw-r--r--lldb/source/Symbol/CompilerType.cpp2
-rw-r--r--lldb/source/Symbol/Function.cpp4
-rw-r--r--lldb/source/Symbol/LocateSymbolFile.cpp2
-rw-r--r--lldb/source/Symbol/Symbol.cpp4
-rw-r--r--lldb/source/Symbol/SymbolContext.cpp2
-rw-r--r--lldb/source/Symbol/SymbolFile.cpp6
-rw-r--r--lldb/source/Symbol/SymbolVendor.cpp8
-rw-r--r--lldb/source/Symbol/Symtab.cpp16
-rw-r--r--lldb/source/Symbol/Type.cpp10
-rw-r--r--lldb/source/Symbol/TypeList.cpp2
-rw-r--r--lldb/source/Symbol/TypeMap.cpp2
-rw-r--r--lldb/source/Symbol/TypeSystem.cpp2
-rw-r--r--lldb/source/Symbol/Variable.cpp2
-rw-r--r--lldb/source/Symbol/VariableList.cpp4
-rw-r--r--lldb/source/Target/ABI.cpp2
-rw-r--r--lldb/source/Target/ObjCLanguageRuntime.cpp6
-rw-r--r--lldb/source/Target/PathMappingList.cpp28
-rw-r--r--lldb/source/Target/Platform.cpp6
-rw-r--r--lldb/source/Target/Process.cpp10
-rw-r--r--lldb/source/Target/StackFrameRecognizer.cpp6
-rw-r--r--lldb/source/Target/StructuredDataPlugin.cpp2
-rw-r--r--lldb/source/Target/Target.cpp14
-rw-r--r--lldb/source/Target/Thread.cpp4
-rw-r--r--lldb/source/Utility/ArchSpec.cpp2
-rw-r--r--lldb/source/Utility/ConstString.cpp10
-rw-r--r--lldb/source/Utility/Event.cpp8
-rw-r--r--lldb/source/Utility/FileSpec.cpp4
-rw-r--r--lldb/source/Utility/Listener.cpp2
140 files changed, 510 insertions, 512 deletions
diff --git a/lldb/source/API/SBType.cpp b/lldb/source/API/SBType.cpp
index 703b4fa..c8194e9 100644
--- a/lldb/source/API/SBType.cpp
+++ b/lldb/source/API/SBType.cpp
@@ -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(
diff --git a/lldb/source/Breakpoint/Breakpoint.cpp b/lldb/source/Breakpoint/Breakpoint.cpp
index 1232b6e..d6cbe3f 100644
--- a/lldb/source/Breakpoint/Breakpoint.cpp
+++ b/lldb/source/Breakpoint/Breakpoint.cpp
@@ -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();
}
diff --git a/lldb/source/Breakpoint/BreakpointName.cpp b/lldb/source/Breakpoint/BreakpointName.cpp
index 46d877c..b822e3b 100644
--- a/lldb/source/Breakpoint/BreakpointName.cpp
+++ b/lldb/source/Breakpoint/BreakpointName.cpp
@@ -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())
{
diff --git a/lldb/source/Breakpoint/BreakpointResolverName.cpp b/lldb/source/Breakpoint/BreakpointResolverName.cpp
index 7c9fa8b..0ffa502 100644
--- a/lldb/source/Breakpoint/BreakpointResolverName.cpp
+++ b/lldb/source/Breakpoint/BreakpointResolverName.cpp
@@ -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)) {
diff --git a/lldb/source/Breakpoint/Watchpoint.cpp b/lldb/source/Breakpoint/Watchpoint.cpp
index 6481ad1..e8a9265 100644
--- a/lldb/source/Breakpoint/Watchpoint.cpp
+++ b/lldb/source/Breakpoint/Watchpoint.cpp
@@ -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();
}
diff --git a/lldb/source/Commands/CommandObjectSource.cpp b/lldb/source/Commands/CommandObjectSource.cpp
index cc08e47..abcf601 100644
--- a/lldb/source/Commands/CommandObjectSource.cpp
+++ b/lldb/source/Commands/CommandObjectSource.cpp
@@ -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();
diff --git a/lldb/source/Commands/CommandObjectType.cpp b/lldb/source/Commands/CommandObjectType.cpp
index 64ed459..887d2b8 100644
--- a/lldb/source/Commands/CommandObjectType.cpp
+++ b/lldb/source/Commands/CommandObjectType.cpp
@@ -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;
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index 00b88a7..c170274 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -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);
diff --git a/lldb/source/Core/Disassembler.cpp b/lldb/source/Core/Disassembler.cpp
index 5f037d8..f5cfcf2 100644
--- a/lldb/source/Core/Disassembler.cpp
+++ b/lldb/source/Core/Disassembler.cpp
@@ -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,
diff --git a/lldb/source/Core/Mangled.cpp b/lldb/source/Core/Mangled.cpp
index 5ab3fdf..e3b3721 100644
--- a/lldb/source/Core/Mangled.cpp
+++ b/lldb/source/Core/Mangled.cpp
@@ -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 << '\'';
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index 8ff01cb..262e15d 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -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;
diff --git a/lldb/source/Core/ModuleList.cpp b/lldb/source/Core/ModuleList.cpp
index 74b9af3..8740bd0 100644
--- a/lldb/source/Core/ModuleList.cpp
+++ b/lldb/source/Core/ModuleList.cpp
@@ -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 {
diff --git a/lldb/source/Core/PluginManager.cpp b/lldb/source/Core/PluginManager.cpp
index 8a03ca1..07121da 100644
--- a/lldb/source/Core/PluginManager.cpp
+++ b/lldb/source/Core/PluginManager.cpp
@@ -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,
diff --git a/lldb/source/Core/RichManglingContext.cpp b/lldb/source/Core/RichManglingContext.cpp
index 16c764a..5957a2b 100644
--- a/lldb/source/Core/RichManglingContext.cpp
+++ b/lldb/source/Core/RichManglingContext.cpp
@@ -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;
diff --git a/lldb/source/Core/Section.cpp b/lldb/source/Core/Section.cpp
index a139d69..1fa5a8c 100644
--- a/lldb/source/Core/Section.cpp
+++ b/lldb/source/Core/Section.cpp
@@ -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()) {
diff --git a/lldb/source/Core/UserSettingsController.cpp b/lldb/source/Core/UserSettingsController.cpp
index 3331ead..3a65676 100644
--- a/lldb/source/Core/UserSettingsController.cpp
+++ b/lldb/source/Core/UserSettingsController.cpp
@@ -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);
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp
index b0a1962..e749315 100644
--- a/lldb/source/Core/ValueObject.cpp
+++ b/lldb/source/Core/ValueObject.cpp
@@ -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());
}
diff --git a/lldb/source/Core/ValueObjectCast.cpp b/lldb/source/Core/ValueObjectCast.cpp
index d588f03..6ccda8c 100644
--- a/lldb/source/Core/ValueObjectCast.cpp
+++ b/lldb/source/Core/ValueObjectCast.cpp
@@ -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);
diff --git a/lldb/source/Core/ValueObjectChild.cpp b/lldb/source/Core/ValueObjectChild.cpp
index e12ed57..01f2e20 100644
--- a/lldb/source/Core/ValueObjectChild.cpp
+++ b/lldb/source/Core/ValueObjectChild.cpp
@@ -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)
diff --git a/lldb/source/Core/ValueObjectConstResult.cpp b/lldb/source/Core/ValueObjectConstResult.cpp
index f69731b..a1b2cac 100644
--- a/lldb/source/Core/ValueObjectConstResult.cpp
+++ b/lldb/source/Core/ValueObjectConstResult.cpp
@@ -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;
diff --git a/lldb/source/Core/ValueObjectConstResultCast.cpp b/lldb/source/Core/ValueObjectConstResultCast.cpp
index 2c1264f..b47e699e 100644
--- a/lldb/source/Core/ValueObjectConstResultCast.cpp
+++ b/lldb/source/Core/ValueObjectConstResultCast.cpp
@@ -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;
diff --git a/lldb/source/Core/ValueObjectConstResultChild.cpp b/lldb/source/Core/ValueObjectConstResultChild.cpp
index 747e409..4e0b303 100644
--- a/lldb/source/Core/ValueObjectConstResultChild.cpp
+++ b/lldb/source/Core/ValueObjectConstResultChild.cpp
@@ -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)
diff --git a/lldb/source/Core/ValueObjectRegister.cpp b/lldb/source/Core/ValueObjectRegister.cpp
index ea8afec..1d12747 100644
--- a/lldb/source/Core/ValueObjectRegister.cpp
+++ b/lldb/source/Core/ValueObjectRegister.cpp
@@ -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());
diff --git a/lldb/source/Core/ValueObjectSyntheticFilter.cpp b/lldb/source/Core/ValueObjectSyntheticFilter.cpp
index a701d92..4004732 100644
--- a/lldb/source/Core/ValueObjectSyntheticFilter.cpp
+++ b/lldb/source/Core/ValueObjectSyntheticFilter.cpp
@@ -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;
diff --git a/lldb/source/DataFormatters/DataVisualization.cpp b/lldb/source/DataFormatters/DataVisualization.cpp
index 7ec3a93..300ce2a 100644
--- a/lldb/source/DataFormatters/DataVisualization.cpp
+++ b/lldb/source/DataFormatters/DataVisualization.cpp
@@ -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);
}
diff --git a/lldb/source/DataFormatters/FormatCache.cpp b/lldb/source/DataFormatters/FormatCache.cpp
index c05b116..7e328cb 100644
--- a/lldb/source/DataFormatters/FormatCache.cpp
+++ b/lldb/source/DataFormatters/FormatCache.cpp
@@ -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);
diff --git a/lldb/source/DataFormatters/FormatManager.cpp b/lldb/source/DataFormatters/FormatManager.cpp
index 16d2462..0dcc024 100644
--- a/lldb/source/DataFormatters/FormatManager.cpp
+++ b/lldb/source/DataFormatters/FormatManager.cpp
@@ -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);
}
diff --git a/lldb/source/DataFormatters/TypeSynthetic.cpp b/lldb/source/DataFormatters/TypeSynthetic.cpp
index 2366958..ccc5d19 100644
--- a/lldb/source/DataFormatters/TypeSynthetic.cpp
+++ b/lldb/source/DataFormatters/TypeSynthetic.cpp
@@ -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,
diff --git a/lldb/source/DataFormatters/VectorType.cpp b/lldb/source/DataFormatters/VectorType.cpp
index de59724..18880f7 100644
--- a/lldb/source/DataFormatters/VectorType.cpp
+++ b/lldb/source/DataFormatters/VectorType.cpp
@@ -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())
diff --git a/lldb/source/Expression/ExpressionVariable.cpp b/lldb/source/Expression/ExpressionVariable.cpp
index 160c9ad..faac977 100644
--- a/lldb/source/Expression/ExpressionVariable.cpp
+++ b/lldb/source/Expression/ExpressionVariable.cpp
@@ -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())
diff --git a/lldb/source/Expression/IRExecutionUnit.cpp b/lldb/source/Expression/IRExecutionUnit.cpp
index 6528a27..15c2a7d 100644
--- a/lldb/source/Expression/IRExecutionUnit.cpp
+++ b/lldb/source/Expression/IRExecutionUnit.cpp
@@ -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;
diff --git a/lldb/source/Host/common/FileSystem.cpp b/lldb/source/Host/common/FileSystem.cpp
index 3315962..7ce8634 100644
--- a/lldb/source/Host/common/FileSystem.cpp
+++ b/lldb/source/Host/common/FileSystem.cpp
@@ -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;
diff --git a/lldb/source/Interpreter/OptionValueDictionary.cpp b/lldb/source/Interpreter/OptionValueDictionary.cpp
index 3268303..eb66c48 100644
--- a/lldb/source/Interpreter/OptionValueDictionary.cpp
+++ b/lldb/source/Interpreter/OptionValueDictionary.cpp
@@ -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);
diff --git a/lldb/source/Interpreter/OptionValueProperties.cpp b/lldb/source/Interpreter/OptionValueProperties.cpp
index 63ed444..6693cc9 100644
--- a/lldb/source/Interpreter/OptionValueProperties.cpp
+++ b/lldb/source/Interpreter/OptionValueProperties.cpp
@@ -20,7 +20,7 @@
using namespace lldb;
using namespace lldb_private;
-OptionValueProperties::OptionValueProperties(const ConstString &name)
+OptionValueProperties::OptionValueProperties(ConstString name)
: OptionValue(), m_name(name), m_properties(), m_name_to_index() {}
OptionValueProperties::OptionValueProperties(
@@ -66,8 +66,8 @@ 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();
diff --git a/lldb/source/Interpreter/Property.cpp b/lldb/source/Interpreter/Property.cpp
index eafa7af..7820931 100644
--- a/lldb/source/Interpreter/Property.cpp
+++ b/lldb/source/Interpreter/Property.cpp
@@ -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) {}
diff --git a/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp b/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp
index a9e643ac..a96c795 100644
--- a/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp
+++ b/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp
@@ -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();
diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
index c561eb4..87e43eb 100644
--- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
+++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
@@ -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;
diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.h b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.h
index b3e0083..298e75c 100644
--- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.h
+++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.h
@@ -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;
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
index 316f062..1c8e3c7 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
@@ -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++;
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h
index cf305b4..063d82e 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h
@@ -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;
//
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
index 24ca970..5212712 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
@@ -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;
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
index ac6690d..dd866c3 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
@@ -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);
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp
index b510cd8..b5a2c80 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp
@@ -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(),
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h
index 731ab14..b9767e22 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h
@@ -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);
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
index 9d5ead4..f7eaa8f 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
@@ -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) {
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp
index d66b443..e77ba86 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp
@@ -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());
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h
index f713dc4..2b5e6de 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h
@@ -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);
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h b/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h
index 526d787..137a14e 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h
+++ b/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h
@@ -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);
//------------------------------------------------------------------
diff --git a/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp b/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp
index 85e54b0..a98f860 100644
--- a/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp
+++ b/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp
@@ -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();
diff --git a/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.h b/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.h
index 17498af..e9938d4 100644
--- a/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.h
+++ b/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.h
@@ -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);
diff --git a/lldb/source/Plugins/Language/CPlusPlus/BlockPointer.cpp b/lldb/source/Plugins/Language/CPlusPlus/BlockPointer.cpp
index 6086aff..87b5b59 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/BlockPointer.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/BlockPointer.cpp
@@ -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;
diff --git a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h
index 70a00c0..c6792e9 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h
+++ b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h
@@ -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();
diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp
index 15d3491..e63452e 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp
@@ -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"))
diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibCxx.h b/lldb/source/Plugins/Language/CPlusPlus/LibCxx.h
index 4b88159..214f551 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/LibCxx.h
+++ b/lldb/source/Plugins/Language/CPlusPlus/LibCxx.h
@@ -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;
diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibCxxAtomic.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibCxxAtomic.cpp
index f9f79c5..b4e7a17 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/LibCxxAtomic.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/LibCxxAtomic.cpp
@@ -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;
}
diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibCxxBitset.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibCxxBitset.cpp
index 440f359..815dafb 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/LibCxxBitset.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/LibCxxBitset.cpp
@@ -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());
}
diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp
index 27eca9e..79c7434 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp
@@ -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());
diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibCxxList.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibCxxList.cpp
index ba47e22..d375cc2 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/LibCxxList.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/LibCxxList.cpp
@@ -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; }
diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp
index ad23fc7..619c718 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp
@@ -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());
}
diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibCxxOptional.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibCxxOptional.cpp
index 7ae251b..1160215 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/LibCxxOptional.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/LibCxxOptional.cpp
@@ -20,7 +20,7 @@ public:
Update();
}
- size_t GetIndexOfChildWithName(const ConstString &name) override {
+ size_t GetIndexOfChildWithName(ConstString name) override {
return formatters::ExtractIndexFromString(name.GetCString());
}
diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibCxxQueue.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibCxxQueue.cpp
index 8401e2f..4b72089 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/LibCxxQueue.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/LibCxxQueue.cpp
@@ -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;
}
diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibCxxTuple.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibCxxTuple.cpp
index 276b703..8da7460 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/LibCxxTuple.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/LibCxxTuple.cpp
@@ -20,7 +20,7 @@ public:
Update();
}
- size_t GetIndexOfChildWithName(const ConstString &name) override {
+ size_t GetIndexOfChildWithName(ConstString name) override {
return formatters::ExtractIndexFromString(name.GetCString());
}
diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp
index f4abe931..b2c38c9 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp
@@ -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());
}
diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp
index 11f845e..491cf04 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp
@@ -173,7 +173,7 @@ public:
Update();
}
- size_t GetIndexOfChildWithName(const ConstString &name) override {
+ size_t GetIndexOfChildWithName(ConstString name) override {
return formatters::ExtractIndexFromString(name.GetCString());
}
diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp
index c3bf9f8..b7ed597 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp
@@ -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();
diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp
index 7f00f36..0aac93c 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp
@@ -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;
diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibStdcppTuple.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibStdcppTuple.cpp
index 111b28b..66624e5 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/LibStdcppTuple.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/LibStdcppTuple.cpp
@@ -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());
}
diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp
index 335523e..451e58f 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp
@@ -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"))
diff --git a/lldb/source/Plugins/Language/ObjC/Cocoa.cpp b/lldb/source/Plugins/Language/ObjC/Cocoa.cpp
index 3720560..c066c6c 100644
--- a/lldb/source/Plugins/Language/ObjC/Cocoa.cpp
+++ b/lldb/source/Plugins/Language/ObjC/Cocoa.cpp
@@ -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;
}
};
diff --git a/lldb/source/Plugins/Language/ObjC/NSArray.cpp b/lldb/source/Plugins/Language/ObjC/NSArray.cpp
index 9eec28b..ab1da08 100644
--- a/lldb/source/Plugins/Language/ObjC/NSArray.cpp
+++ b/lldb/source/Plugins/Language/ObjC/NSArray.cpp
@@ -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)
diff --git a/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp b/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp
index 61e9de2..61eff29 100644
--- a/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp
+++ b/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp
@@ -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())
diff --git a/lldb/source/Plugins/Language/ObjC/NSError.cpp b/lldb/source/Plugins/Language/ObjC/NSError.cpp
index f7a20b6..9e10262 100644
--- a/lldb/source/Plugins/Language/ObjC/NSError.cpp
+++ b/lldb/source/Plugins/Language/ObjC/NSError.cpp
@@ -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;
diff --git a/lldb/source/Plugins/Language/ObjC/NSException.cpp b/lldb/source/Plugins/Language/ObjC/NSException.cpp
index e24028d..5f2ec4e 100644
--- a/lldb/source/Plugins/Language/ObjC/NSException.cpp
+++ b/lldb/source/Plugins/Language/ObjC/NSException.cpp
@@ -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;
diff --git a/lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp b/lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp
index 660344c..2fe042f 100644
--- a/lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp
+++ b/lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp
@@ -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())
diff --git a/lldb/source/Plugins/Language/ObjC/NSSet.cpp b/lldb/source/Plugins/Language/ObjC/NSSet.cpp
index c824d6e..96f6161 100644
--- a/lldb/source/Plugins/Language/ObjC/NSSet.cpp
+++ b/lldb/source/Plugins/Language/ObjC/NSSet.cpp
@@ -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())
diff --git a/lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp b/lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp
index 3ec821d..29ee168 100644
--- a/lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp
+++ b/lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp
@@ -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();
diff --git a/lldb/source/Plugins/Language/ObjC/ObjCLanguage.h b/lldb/source/Plugins/Language/ObjC/ObjCLanguage.h
index efb53dc..aed867e 100644
--- a/lldb/source/Plugins/Language/ObjC/ObjCLanguage.h
+++ b/lldb/source/Plugins/Language/ObjC/ObjCLanguage.h
@@ -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:]"
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp
index fba03e8..6b51177 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp
@@ -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;
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.h
index d243ab2..41e211f 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.h
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.h
@@ -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;
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
index 3408ad6..4841072 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -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();
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
index 1129309..5a4fc69 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
@@ -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;
diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
index 7dd3b87..81551e7 100644
--- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
@@ -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);
diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
index 71d7260..d416b92 100644
--- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
+++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
@@ -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(
diff --git a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
index 50e4749..a52c001 100644
--- a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
+++ b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
@@ -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);
diff --git a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
index 868f505..13afb98 100644
--- a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
+++ b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
@@ -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; }
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index 7ea6030..ca2da5a 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -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 =
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index 64f39f4..7d5386b 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -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(
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
index 83f382c..527acae 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
@@ -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;
diff --git a/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp b/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
index 63348c3..f59d037 100644
--- a/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
+++ b/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
@@ -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()
diff --git a/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.h b/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.h
index e78da95..116224a 100644
--- a/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.h
+++ b/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.h
@@ -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);
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index afa8e9c..33c0e0d 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -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) {
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
index 3ab2156..84e2c2a 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
@@ -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,
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index f5b787d1..1b9c5d6 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -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);
}
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
index aa9aff55..efa7d28 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
@@ -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;
diff --git a/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp b/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
index 4cd8f0a..3ab5061 100644
--- a/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
+++ b/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
@@ -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
diff --git a/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h b/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h
index 8571662..f9ddb04 100644
--- a/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h
+++ b/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h
@@ -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;
diff --git a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
index ec50f9b..9057c2a 100644
--- a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
+++ b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
@@ -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)
diff --git a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
index ef3073b..42bb118 100644
--- a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
+++ b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
@@ -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();
}
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp b/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp
index 6a47a2a..6710ae1 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp
@@ -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);
}
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.h b/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.h
index e969f27..2d7b460 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.h
@@ -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,
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 734f066b..05cc4ef 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -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;
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
index 7ac344c..9fc2015 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
@@ -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);
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
index b27dc49c..5825656 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
@@ -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;
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
index aabea2c..5139fff 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
@@ -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() {
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
index 07b458c..9d118d6 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
@@ -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);
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h
index 75363ac..c73d16f 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h
@@ -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();
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.h b/lldb/source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.h
index bda65e2..06e1194 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.h
@@ -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();
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
index 6939f34..ff6fffb 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
@@ -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 {};
}
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
index 1264244b..54cb442 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
@@ -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;
diff --git a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
index 84b9e7f..30c8f9f 100644
--- a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
+++ b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
@@ -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);
diff --git a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
index e3b0931..72713aa 100644
--- a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
+++ b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
@@ -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;
diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp
index 8184f7c..b5fcc9b 100644
--- a/lldb/source/Symbol/ClangASTContext.cpp
+++ b/lldb/source/Symbol/ClangASTContext.cpp
@@ -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));
diff --git a/lldb/source/Symbol/CompilerType.cpp b/lldb/source/Symbol/CompilerType.cpp
index 71390e5..80b5583 100644
--- a/lldb/source/Symbol/CompilerType.cpp
+++ b/lldb/source/Symbol/CompilerType.cpp
@@ -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);
diff --git a/lldb/source/Symbol/Function.cpp b/lldb/source/Symbol/Function.cpp
index a7f32d3..d7df70b 100644
--- a/lldb/source/Symbol/Function.cpp
+++ b/lldb/source/Symbol/Function.cpp
@@ -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)
diff --git a/lldb/source/Symbol/LocateSymbolFile.cpp b/lldb/source/Symbol/LocateSymbolFile.cpp
index 2a4d49c..07054ee 100644
--- a/lldb/source/Symbol/LocateSymbolFile.cpp
+++ b/lldb/source/Symbol/LocateSymbolFile.cpp
@@ -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);
diff --git a/lldb/source/Symbol/Symbol.cpp b/lldb/source/Symbol/Symbol.cpp
index f15b05a..6e9bfe7 100644
--- a/lldb/source/Symbol/Symbol.cpp
+++ b/lldb/source/Symbol/Symbol.cpp
@@ -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;
diff --git a/lldb/source/Symbol/SymbolContext.cpp b/lldb/source/Symbol/SymbolContext.cpp
index bc014a7..292830e 100644
--- a/lldb/source/Symbol/SymbolContext.cpp
+++ b/lldb/source/Symbol/SymbolContext.cpp
@@ -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) {
diff --git a/lldb/source/Symbol/SymbolFile.cpp b/lldb/source/Symbol/SymbolFile.cpp
index 85242ae..e55b997 100644
--- a/lldb/source/Symbol/SymbolFile.cpp
+++ b/lldb/source/Symbol/SymbolFile.cpp
@@ -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) {
diff --git a/lldb/source/Symbol/SymbolVendor.cpp b/lldb/source/Symbol/SymbolVendor.cpp
index fd148a4..112d487 100644
--- a/lldb/source/Symbol/SymbolVendor.cpp
+++ b/lldb/source/Symbol/SymbolVendor.cpp
@@ -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());
diff --git a/lldb/source/Symbol/Symtab.cpp b/lldb/source/Symbol/Symtab.cpp
index 6332d73..b04028c 100644
--- a/lldb/source/Symbol/Symtab.cpp
+++ b/lldb/source/Symbol/Symtab.cpp
@@ -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;
diff --git a/lldb/source/Symbol/Type.cpp b/lldb/source/Symbol/Type.cpp
index 43d039b..63356ab 100644
--- a/lldb/source/Symbol/Type.cpp
+++ b/lldb/source/Symbol/Type.cpp
@@ -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)
diff --git a/lldb/source/Symbol/TypeList.cpp b/lldb/source/Symbol/TypeList.cpp
index 7cc604b..480b553 100644
--- a/lldb/source/Symbol/TypeList.cpp
+++ b/lldb/source/Symbol/TypeList.cpp
@@ -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.
diff --git a/lldb/source/Symbol/TypeMap.cpp b/lldb/source/Symbol/TypeMap.cpp
index 641bc95..010c937 100644
--- a/lldb/source/Symbol/TypeMap.cpp
+++ b/lldb/source/Symbol/TypeMap.cpp
@@ -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.
diff --git a/lldb/source/Symbol/TypeSystem.cpp b/lldb/source/Symbol/TypeSystem.cpp
index d1b6f16..fb9c8e7 100644
--- a/lldb/source/Symbol/TypeSystem.cpp
+++ b/lldb/source/Symbol/TypeSystem.cpp
@@ -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();
}
diff --git a/lldb/source/Symbol/Variable.cpp b/lldb/source/Symbol/Variable.cpp
index e4cb36b..ceb127d 100644
--- a/lldb/source/Symbol/Variable.cpp
+++ b/lldb/source/Symbol/Variable.cpp
@@ -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;
diff --git a/lldb/source/Symbol/VariableList.cpp b/lldb/source/Symbol/VariableList.cpp
index 5dce9a0..f8a7e7a 100644
--- a/lldb/source/Symbol/VariableList.cpp
+++ b/lldb/source/Symbol/VariableList.cpp
@@ -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;
diff --git a/lldb/source/Target/ABI.cpp b/lldb/source/Target/ABI.cpp
index 47ec106..d1fc274 100644
--- a/lldb/source/Target/ABI.cpp
+++ b/lldb/source/Target/ABI.cpp
@@ -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) {
diff --git a/lldb/source/Target/ObjCLanguageRuntime.cpp b/lldb/source/Target/ObjCLanguageRuntime.cpp
index fac1fae..cd97707 100644
--- a/lldb/source/Target/ObjCLanguageRuntime.cpp
+++ b/lldb/source/Target/ObjCLanguageRuntime.cpp
@@ -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;
diff --git a/lldb/source/Target/PathMappingList.cpp b/lldb/source/Target/PathMappingList.cpp
index cbbc7c4..3c07b80 100644
--- a/lldb/source/Target/PathMappingList.cpp
+++ b/lldb/source/Target/PathMappingList.cpp
@@ -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();
diff --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp
index 6dab523..79ef638 100644
--- a/lldb/source/Target/Platform.cpp
+++ b/lldb/source/Target/Platform.cpp
@@ -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) {
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index d74aaf1..e76e487 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -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
diff --git a/lldb/source/Target/StackFrameRecognizer.cpp b/lldb/source/Target/StackFrameRecognizer.cpp
index b6ba312..47ad6a0 100644
--- a/lldb/source/Target/StackFrameRecognizer.cpp
+++ b/lldb/source/Target/StackFrameRecognizer.cpp
@@ -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);
}
diff --git a/lldb/source/Target/StructuredDataPlugin.cpp b/lldb/source/Target/StructuredDataPlugin.cpp
index d8fbb54..842708b 100644
--- a/lldb/source/Target/StructuredDataPlugin.cpp
+++ b/lldb/source/Target/StructuredDataPlugin.cpp
@@ -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;
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index 046e878..ec08a2a 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -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;
}
diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp
index 82564f7..baefff9 100644
--- a/lldb/source/Target/Thread.cpp
+++ b/lldb/source/Target/Thread.cpp
@@ -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;
}
diff --git a/lldb/source/Utility/ArchSpec.cpp b/lldb/source/Utility/ArchSpec.cpp
index f53b7d2..9e835aa 100644
--- a/lldb/source/Utility/ArchSpec.cpp
+++ b/lldb/source/Utility/ArchSpec.cpp
@@ -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;
}
diff --git a/lldb/source/Utility/ConstString.cpp b/lldb/source/Utility/ConstString.cpp
index 7ab98ef..9a6e625 100644
--- a/lldb/source/Utility/ConstString.cpp
+++ b/lldb/source/Utility/ConstString.cpp
@@ -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);
}
diff --git a/lldb/source/Utility/Event.cpp b/lldb/source/Utility/Event.cpp
index f6256f7..9e293db 100644
--- a/lldb/source/Utility/Event.cpp
+++ b/lldb/source/Utility/Event.cpp
@@ -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;
}
diff --git a/lldb/source/Utility/FileSpec.cpp b/lldb/source/Utility/FileSpec.cpp
index 38ce36a..f877b6f 100644
--- a/lldb/source/Utility/FileSpec.cpp
+++ b/lldb/source/Utility/FileSpec.cpp
@@ -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
diff --git a/lldb/source/Utility/Listener.cpp b/lldb/source/Utility/Listener.cpp
index aeea5d6..5b97fbe 100644
--- a/lldb/source/Utility/Listener.cpp
+++ b/lldb/source/Utility/Listener.cpp
@@ -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) {