summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2019-03-06 21:22:25 +0000
committerAdrian Prantl <aprantl@apple.com>2019-03-06 21:22:25 +0000
commit0e4c482124f098957fc13bcfbabc36775dd190ab (patch)
tree34ee130b6d6de0d41a229021c4b46ab66b891a08 /lldb/source/Plugins/SymbolFile
parent480bce28ffc4640f443e262fa110af50b0d635df (diff)
downloadbcm5719-llvm-0e4c482124f098957fc13bcfbabc36775dd190ab.tar.gz
bcm5719-llvm-0e4c482124f098957fc13bcfbabc36775dd190ab.zip
Pass ConstString by value (NFC)
My apologies for the large patch. With the exception of ConstString.h itself it was entirely produced by sed. ConstString has exactly one const char * data member, so passing a ConstString by reference is not any more efficient than copying it by value. In both cases a single pointer is passed. But passing it by value makes it harder to accidentally return the address of a local object. (This fixes rdar://problem/48640859 for the Apple folks) Differential Revision: https://reviews.llvm.org/D59030 llvm-svn: 355553
Diffstat (limited to 'lldb/source/Plugins/SymbolFile')
-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
15 files changed, 57 insertions, 59 deletions
diff --git a/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp b/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
index ec50f9bc2d9..9057c2a8d3c 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 ef3073b341d..42bb1186437 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 6a47a2ae0e7..6710ae1f2c6 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 e969f27e348..2d7b4605247 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 734f066b836..05cc4ef367e 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 7ac344cd232..9fc2015f0ad 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 b27dc49ce99..582565662f7 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 aabea2c30d6..5139fffe672 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 07b458ca0c7..9d118d63dba 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 75363ac6e2c..c73d16ffa99 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 bda65e2f375..06e11941eca 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 6939f34b44c..ff6fffb42d8 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 1264244b622..54cb4429c15 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 84b9e7f86b3..30c8f9fb073 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 e3b09317507..72713aa0ba2 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;
OpenPOWER on IntegriCloud