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 | 8f3be7a32b631e9ba584872c1f0dde8fd8536c07 (patch) | |
tree | b4cfca7eb1e0996decd88a2b1dd1954ff3d7ff28 /lldb/source/Host/linux | |
parent | 8487d22d12f5b7b5c745e5a5cdda61f8a07391e1 (diff) | |
download | bcm5719-llvm-8f3be7a32b631e9ba584872c1f0dde8fd8536c07.tar.gz bcm5719-llvm-8f3be7a32b631e9ba584872c1f0dde8fd8536c07.zip |
[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
Diffstat (limited to 'lldb/source/Host/linux')
-rw-r--r-- | lldb/source/Host/linux/Host.cpp | 3 | ||||
-rw-r--r-- | lldb/source/Host/linux/HostInfoLinux.cpp | 5 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Host/linux/Host.cpp b/lldb/source/Host/linux/Host.cpp index 1a0eb767eb3..35a03f4b161 100644 --- a/lldb/source/Host/linux/Host.cpp +++ b/lldb/source/Host/linux/Host.cpp @@ -190,8 +190,7 @@ static bool GetProcessAndStatInfo(::pid_t pid, return false; process_info.SetProcessID(pid); - process_info.GetExecutableFile().SetFile(PathRef, false, - FileSpec::Style::native); + process_info.GetExecutableFile().SetFile(PathRef, FileSpec::Style::native); llvm::StringRef Rest = Environ->getBuffer(); while (!Rest.empty()) { diff --git a/lldb/source/Host/linux/HostInfoLinux.cpp b/lldb/source/Host/linux/HostInfoLinux.cpp index 12885756e2b..e0bf49f430a 100644 --- a/lldb/source/Host/linux/HostInfoLinux.cpp +++ b/lldb/source/Host/linux/HostInfoLinux.cpp @@ -171,7 +171,7 @@ FileSpec HostInfoLinux::GetProgramFileSpec() { ssize_t len = readlink("/proc/self/exe", exe_path, sizeof(exe_path) - 1); if (len > 0) { exe_path[len] = 0; - g_program_filespec.SetFile(exe_path, false, FileSpec::Style::native); + g_program_filespec.SetFile(exe_path, FileSpec::Style::native); } } @@ -187,7 +187,8 @@ bool HostInfoLinux::ComputeSupportExeDirectory(FileSpec &file_spec) { } bool HostInfoLinux::ComputeSystemPluginsDirectory(FileSpec &file_spec) { - FileSpec temp_file("/usr/lib" LLDB_LIBDIR_SUFFIX "/lldb/plugins", true); + FileSpec temp_file("/usr/lib" LLDB_LIBDIR_SUFFIX "/lldb/plugins"); + FileSystem::Instance().Resolve(temp_file); file_spec.GetDirectory().SetCString(temp_file.GetPath().c_str()); return true; } |