diff options
author | Sean Callanan <scallanan@apple.com> | 2015-09-18 22:24:57 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2015-09-18 22:24:57 +0000 |
commit | 9077e9f8f256e353a03423973a4bfd1b3317ad21 (patch) | |
tree | ff2122c09b42a49808a4aeb2931f63b85345ca17 /lldb/source/Host/common | |
parent | 658dccd1c8ea21efc1772b83caf51632729a3dbb (diff) | |
download | bcm5719-llvm-9077e9f8f256e353a03423973a4bfd1b3317ad21.tar.gz bcm5719-llvm-9077e9f8f256e353a03423973a4bfd1b3317ad21.zip |
Moved ResolveSymbolicLink() to the FileSystem where it belongs, thanks
zturner!
http://reviews.llvm.org/D12984
llvm-svn: 248055
Diffstat (limited to 'lldb/source/Host/common')
-rw-r--r-- | lldb/source/Host/common/FileSpec.cpp | 26 | ||||
-rw-r--r-- | lldb/source/Host/common/HostInfoBase.cpp | 2 |
2 files changed, 1 insertions, 27 deletions
diff --git a/lldb/source/Host/common/FileSpec.cpp b/lldb/source/Host/common/FileSpec.cpp index f7225a4b0bc..9efdacb010b 100644 --- a/lldb/source/Host/common/FileSpec.cpp +++ b/lldb/source/Host/common/FileSpec.cpp @@ -811,32 +811,6 @@ FileSpec::IsSymbolicLink () const #endif } -FileSpec -FileSpec::ResolveSymbolicLink () const { - if (!IsSymbolicLink()) - { - return *this; - } - - char resolved_path[PATH_MAX]; - if (!GetPath (resolved_path, sizeof (resolved_path))) - { - return *this; - } - -#ifdef _WIN32 - return *this; // TODO make this work on win32 -#else - char real_path[PATH_MAX + 1]; - if (realpath(resolved_path, real_path) == nullptr) - { - return *this; - } - - return FileSpec(real_path, false); -#endif -} - uint32_t FileSpec::GetPermissions () const { diff --git a/lldb/source/Host/common/HostInfoBase.cpp b/lldb/source/Host/common/HostInfoBase.cpp index e7340c538f3..3cb00a875e2 100644 --- a/lldb/source/Host/common/HostInfoBase.cpp +++ b/lldb/source/Host/common/HostInfoBase.cpp @@ -308,7 +308,7 @@ HostInfoBase::ComputeSharedLibraryDirectory(FileSpec &file_spec) Host::GetModuleFileSpecForHostAddress(reinterpret_cast<void *>(reinterpret_cast<intptr_t>(HostInfoBase::GetLLDBPath)))); // This is necessary because when running the testsuite the shlib might be a symbolic link inside the Python resource dir. - lldb_file_spec = lldb_file_spec.ResolveSymbolicLink(); + FileSystem::ResolveSymbolicLink(lldb_file_spec, lldb_file_spec); // Remove the filename so that this FileSpec only represents the directory. file_spec.GetDirectory() = lldb_file_spec.GetDirectory(); |