[FileSystem] Move path resolution logic out of FileSpec
This patch removes the logic for resolving paths out of FileSpec and
updates call sites to rely on the FileSystem class instead.
Differential revision: https://reviews.llvm.org/D53915
llvm-svn: 345890
diff --git a/lldb/source/Symbol/CompileUnit.cpp b/lldb/source/Symbol/CompileUnit.cpp
index 8f8a331..79cf018 100644
--- a/lldb/source/Symbol/CompileUnit.cpp
+++ b/lldb/source/Symbol/CompileUnit.cpp
@@ -21,7 +21,7 @@
const char *pathname, const lldb::user_id_t cu_sym_id,
lldb::LanguageType language,
lldb_private::LazyBool is_optimized)
- : ModuleChild(module_sp), FileSpec(pathname, false), UserID(cu_sym_id),
+ : ModuleChild(module_sp), FileSpec(pathname), UserID(cu_sym_id),
m_user_data(user_data), m_language(language), m_flags(0),
m_support_files(), m_line_table_ap(), m_variables(),
m_is_optimized(is_optimized) {
diff --git a/lldb/source/Symbol/ObjectFile.cpp b/lldb/source/Symbol/ObjectFile.cpp
index 846ac77..bd94ec0 100644
--- a/lldb/source/Symbol/ObjectFile.cpp
+++ b/lldb/source/Symbol/ObjectFile.cpp
@@ -582,7 +582,7 @@
std::string obj;
if (regex_match.GetMatchAtIndex(path_with_object, 1, path) &&
regex_match.GetMatchAtIndex(path_with_object, 2, obj)) {
- archive_file.SetFile(path, false, FileSpec::Style::native);
+ archive_file.SetFile(path, FileSpec::Style::native);
archive_object.SetCString(obj.c_str());
if (must_exist && !FileSystem::Instance().Exists(archive_file))
return false;
diff --git a/lldb/source/Symbol/Symbol.cpp b/lldb/source/Symbol/Symbol.cpp
index 69fd542..8d055c1 100644
--- a/lldb/source/Symbol/Symbol.cpp
+++ b/lldb/source/Symbol/Symbol.cpp
@@ -141,7 +141,7 @@
// back into a string that is the re-exported name.
intptr_t str_ptr = m_addr_range.GetByteSize();
if (str_ptr != 0)
- return FileSpec((const char *)str_ptr, false);
+ return FileSpec((const char *)str_ptr);
}
return FileSpec();
}
diff --git a/lldb/source/Symbol/SymbolContext.cpp b/lldb/source/Symbol/SymbolContext.cpp
index 8716f50..eac3ed4 100644
--- a/lldb/source/Symbol/SymbolContext.cpp
+++ b/lldb/source/Symbol/SymbolContext.cpp
@@ -999,7 +999,7 @@
break;
case eModuleSpecified: {
// See if we can find the Module, if so stick it in the SymbolContext.
- FileSpec module_file_spec(spec_string, false);
+ FileSpec module_file_spec(spec_string);
ModuleSpec module_spec(module_file_spec);
lldb::ModuleSP module_sp(
m_target_sp->GetImages().FindFirstModule(module_spec));
@@ -1013,7 +1013,7 @@
// CompUnits can't necessarily be resolved here, since an inlined function
// might show up in a number of CompUnits. Instead we just convert to a
// FileSpec and store it away.
- m_file_spec_ap.reset(new FileSpec(spec_string, false));
+ m_file_spec_ap.reset(new FileSpec(spec_string));
m_type |= eFileSpecified;
break;
case eLineStartSpecified:
@@ -1068,7 +1068,7 @@
if (m_module_sp.get() != sc.module_sp.get())
return false;
} else {
- FileSpec module_file_spec(m_module_spec, false);
+ FileSpec module_file_spec(m_module_spec);
if (!FileSpec::Equal(module_file_spec, sc.module_sp->GetFileSpec(),
false))
return false;