From 30e6cbfcfca4836c2b3497d84ffc2043b548b2a6 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Tue, 7 Mar 2017 13:19:15 +0000 Subject: Revert "Use LLVM for all stat-related functionality." this reverts r297116 because it breaks the unittests and TestCompDirSymlink. The ModuleCache unit test is trivially fixable, but the CompDirSymlink failure is a symptom of a deeper problem: llvm's stat functionality is not a drop-in replacement for lldb's. The former is based on stat(2) (which does symlink resolution), while the latter is based on lstat(2) (which does not). This also reverts subsequent build fixes (r297128, r297120, 297117) and r297119 (Remove FileSpec dependency on FileSystem) which builds on top of this. llvm-svn: 297139 --- lldb/source/API/SBPlatform.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lldb/source/API/SBPlatform.cpp') diff --git a/lldb/source/API/SBPlatform.cpp b/lldb/source/API/SBPlatform.cpp index 0f1b99236a7..33d430de8f9 100644 --- a/lldb/source/API/SBPlatform.cpp +++ b/lldb/source/API/SBPlatform.cpp @@ -19,8 +19,6 @@ #include "lldb/Target/Target.h" #include "lldb/Utility/Error.h" -#include "llvm/Support/FileSystem.h" - #include using namespace lldb; @@ -365,7 +363,7 @@ SBError SBPlatform::Put(SBFileSpec &src, SBFileSpec &dst) { if (src.Exists()) { uint32_t permissions = src.ref().GetPermissions(); if (permissions == 0) { - if (llvm::sys::fs::is_directory(src.ref().GetPath())) + if (src.ref().GetFileType() == FileSpec::eFileTypeDirectory) permissions = eFilePermissionsDirectoryDefault; else permissions = eFilePermissionsFileDefault; -- cgit v1.2.3