aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Core/Module.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Core/Module.cpp')
-rw-r--r--lldb/source/Core/Module.cpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index 41c21e1dc326..893e20837124 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -144,9 +144,7 @@ Module::Module(const ModuleSpec &module_spec)
module_spec.GetArchitecture().GetArchitectureName(),
module_spec.GetFileSpec().GetPath().c_str(),
module_spec.GetObjectName().IsEmpty() ? "" : "(",
- module_spec.GetObjectName().IsEmpty()
- ? ""
- : module_spec.GetObjectName().AsCString(""),
+ module_spec.GetObjectName().AsCString(""),
module_spec.GetObjectName().IsEmpty() ? "" : ")");
auto data_sp = module_spec.GetData();
@@ -254,8 +252,7 @@ Module::Module(const FileSpec &file_spec, const ArchSpec &arch,
LLDB_LOGF(log, "%p Module::Module((%s) '%s%s%s%s')",
static_cast<void *>(this), m_arch.GetArchitectureName(),
m_file.GetPath().c_str(), m_object_name.IsEmpty() ? "" : "(",
- m_object_name.IsEmpty() ? "" : m_object_name.AsCString(""),
- m_object_name.IsEmpty() ? "" : ")");
+ m_object_name.AsCString(""), m_object_name.IsEmpty() ? "" : ")");
}
Module::Module() : m_file_has_changed(false), m_first_file_changed_log(false) {
@@ -283,8 +280,7 @@ Module::~Module() {
LLDB_LOGF(log, "%p Module::~Module((%s) '%s%s%s%s')",
static_cast<void *>(this), m_arch.GetArchitectureName(),
m_file.GetPath().c_str(), m_object_name.IsEmpty() ? "" : "(",
- m_object_name.IsEmpty() ? "" : m_object_name.AsCString(""),
- m_object_name.IsEmpty() ? "" : ")");
+ m_object_name.AsCString(""), m_object_name.IsEmpty() ? "" : ")");
// Release any auto pointers before we start tearing down our member
// variables since the object file and symbol files might need to make
// function calls back into this module object. The ordering is important
@@ -1000,8 +996,7 @@ void Module::FindTypes(
FindTypes_Impl(type_basename_const_str, CompilerDeclContext(), max_matches,
searched_symbol_files, typesmap);
if (typesmap.GetSize())
- typesmap.RemoveMismatchedTypes(std::string(type_scope),
- std::string(type_basename), type_class,
+ typesmap.RemoveMismatchedTypes(type_scope, type_basename, type_class,
exact_match);
} else {
// The type is not in a namespace/class scope, just search for it by
@@ -1011,15 +1006,13 @@ void Module::FindTypes(
// class prefix (like "struct", "class", "union", "typedef" etc).
FindTypes_Impl(ConstString(type_basename), CompilerDeclContext(),
UINT_MAX, searched_symbol_files, typesmap);
- typesmap.RemoveMismatchedTypes(std::string(type_scope),
- std::string(type_basename), type_class,
+ typesmap.RemoveMismatchedTypes(type_scope, type_basename, type_class,
exact_match);
} else {
FindTypes_Impl(name, CompilerDeclContext(), UINT_MAX,
searched_symbol_files, typesmap);
if (exact_match) {
- std::string name_str(name.AsCString(""));
- typesmap.RemoveMismatchedTypes(std::string(type_scope), name_str,
+ typesmap.RemoveMismatchedTypes(type_scope, name.GetStringRef(),
type_class, exact_match);
}
}