diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2018-11-01 21:05:36 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2018-11-01 21:05:36 +0000 |
commit | bd899eacb2f000ff835b22ba320c1b6cc423892b (patch) | |
tree | 8627cc0457385a849d6b86c4b227271f9a69bbcb /lldb/source/Plugins/SymbolVendor | |
parent | e9bf25cf0ae2b6d64ca59627a85e03698df7d011 (diff) |
[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
Diffstat (limited to 'lldb/source/Plugins/SymbolVendor')
-rw-r--r-- | lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp | 14 |
2 files changed, 9 insertions, 7 deletions
diff --git a/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp b/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp index a679f609c58..425b612d786 100644 --- a/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp +++ b/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp @@ -101,7 +101,7 @@ SymbolVendorELF::CreateInstance(const lldb::ModuleSP &module_sp, const FileSpec fspec = file_spec_list.GetFileSpecAtIndex(idx); module_spec.GetFileSpec() = obj_file->GetFileSpec(); - module_spec.GetFileSpec().ResolvePath(); + FileSystem::Instance().Resolve(module_spec.GetFileSpec()); module_spec.GetSymbolFileSpec() = fspec; module_spec.GetUUID() = uuid; FileSpec dsym_fspec = Symbols::LocateExecutableSymbolFile(module_spec); diff --git a/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp b/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp index a257edf3818..0d47dd11de1 100644 --- a/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp +++ b/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp @@ -173,7 +173,7 @@ SymbolVendorMacOSX::CreateInstance(const lldb::ModuleSP &module_sp, resources[strlen("/Contents/Resources/")] = '\0'; snprintf(dsym_uuid_plist_path, sizeof(dsym_uuid_plist_path), "%s%s.plist", dsym_path, uuid_str.c_str()); - FileSpec dsym_uuid_plist_spec(dsym_uuid_plist_path, false); + FileSpec dsym_uuid_plist_spec(dsym_uuid_plist_path); if (FileSystem::Instance().Exists(dsym_uuid_plist_spec)) { ApplePropertyList plist(dsym_uuid_plist_path); if (plist) { @@ -244,7 +244,9 @@ SymbolVendorMacOSX::CreateInstance(const lldb::ModuleSP &module_sp, } if (DBGSourcePath[0] == '~') { FileSpec resolved_source_path( - DBGSourcePath.c_str(), true); + DBGSourcePath.c_str()); + FileSystem::Instance().Resolve( + resolved_source_path); DBGSourcePath = resolved_source_path.GetPath(); } @@ -257,8 +259,8 @@ SymbolVendorMacOSX::CreateInstance(const lldb::ModuleSP &module_sp, // Add this as another option in addition to // the full source path remap. if (do_truncate_remapping_names) { - FileSpec build_path(key.AsCString(), false); - FileSpec source_path(DBGSourcePath.c_str(), false); + FileSpec build_path(key.AsCString()); + FileSpec source_path(DBGSourcePath.c_str()); build_path.RemoveLastPathComponent(); build_path.RemoveLastPathComponent(); source_path.RemoveLastPathComponent(); @@ -281,8 +283,8 @@ SymbolVendorMacOSX::CreateInstance(const lldb::ModuleSP &module_sp, if (!DBGBuildSourcePath.empty() && !DBGSourcePath.empty()) { if (DBGSourcePath[0] == '~') { - FileSpec resolved_source_path(DBGSourcePath.c_str(), - true); + FileSpec resolved_source_path(DBGSourcePath.c_str()); + FileSystem::Instance().Resolve(resolved_source_path); DBGSourcePath = resolved_source_path.GetPath(); } module_sp->GetSourceMappingList().Append( |