From 8f3be7a32b631e9ba584872c1f0dde8fd8536c07 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Thu, 1 Nov 2018 21:05:36 +0000 Subject: [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 --- lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp') diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp index 4f36fba5fc9..45736b51db4 100644 --- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -1418,8 +1418,9 @@ Status NativeProcessLinux::PopulateMemoryRegionCache() { m_supports_mem_region = LazyBool::eLazyBoolNo; return parse_error; } - m_mem_region_cache.emplace_back( - info, FileSpec(info.GetName().GetCString(), true)); + FileSpec file_spec(info.GetName().GetCString()); + FileSystem::Instance().Resolve(file_spec); + m_mem_region_cache.emplace_back(info, file_spec); } if (m_mem_region_cache.empty()) { @@ -1723,7 +1724,8 @@ Status NativeProcessLinux::GetLoadedModuleFileSpec(const char *module_path, if (error.Fail()) return error; - FileSpec module_file_spec(module_path, true); + FileSpec module_file_spec(module_path); + FileSystem::Instance().Resolve(module_file_spec); file_spec.Clear(); for (const auto &it : m_mem_region_cache) { @@ -1743,7 +1745,7 @@ Status NativeProcessLinux::GetFileLoadAddress(const llvm::StringRef &file_name, if (error.Fail()) return error; - FileSpec file(file_name, false); + FileSpec file(file_name); for (const auto &it : m_mem_region_cache) { if (it.second == file) { load_addr = it.first.GetRange().GetRangeBase(); -- cgit v1.2.3