Resubmit FileSystem changes.
This was originall reverted due to some test failures in
ModuleCache and TestCompDirSymlink. These issues have all
been resolved and the code now passes all tests.
Differential Revision: https://reviews.llvm.org/D30698
llvm-svn: 297300
diff --git a/lldb/source/API/SBPlatform.cpp b/lldb/source/API/SBPlatform.cpp
index 33d430d..0f1b992 100644
--- a/lldb/source/API/SBPlatform.cpp
+++ b/lldb/source/API/SBPlatform.cpp
@@ -19,6 +19,8 @@
#include "lldb/Target/Target.h"
#include "lldb/Utility/Error.h"
+#include "llvm/Support/FileSystem.h"
+
#include <functional>
using namespace lldb;
@@ -363,7 +365,7 @@
if (src.Exists()) {
uint32_t permissions = src.ref().GetPermissions();
if (permissions == 0) {
- if (src.ref().GetFileType() == FileSpec::eFileTypeDirectory)
+ if (llvm::sys::fs::is_directory(src.ref().GetPath()))
permissions = eFilePermissionsDirectoryDefault;
else
permissions = eFilePermissionsFileDefault;