Use FileSpec::IsRelativeToCurrentWorkingDirectory instead of llvm::sys::path::is_relative in PlatformAndroid::GetFile.

http://reviews.llvm.org/D10141

llvm-svn: 238624
This commit is contained in:
Oleksiy Vyalov 2015-05-29 22:54:45 +00:00
parent 817f40a7fa
commit 32a9da5668
1 changed files with 3 additions and 8 deletions

View File

@ -13,7 +13,6 @@
#include "lldb/Core/Log.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Host/HostInfo.h"
#include "llvm/Support/Path.h"
#include "Utility/UriParser.h"
// Project includes
@ -215,13 +214,9 @@ PlatformAndroid::GetFile (const FileSpec& source,
if (IsHost() || !m_remote_platform_sp)
return PlatformLinux::GetFile(source, destination);
FileSpec source_spec (source);
const auto source_path = source_spec.GetPath (false);
if (llvm::sys::path::is_relative (source_path.c_str ()))
{
source_spec = GetRemoteWorkingDirectory ();
source_spec.AppendPathComponent (source_path.c_str ());
}
FileSpec source_spec (source.GetPath (false), false, FileSpec::ePathSyntaxPosix);
if (source_spec.IsRelativeToCurrentWorkingDirectory ())
source_spec = GetRemoteWorkingDirectory ().CopyByAppendingPathComponent (source_spec.GetCString (false));
AdbClient adb (m_device_id);
return adb.PullFile (source_spec, destination);