Use LLVM for all stat-related functionality.

This deletes LLDB's FileType enumeration and replaces all
users, and all calls to functions that check whether a file
exists etc with corresponding calls to LLVM.

Differential Revision: https://reviews.llvm.org/D30624

llvm-svn: 297116
diff --git a/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp b/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
index f0a62e8..ed8855e 100644
--- a/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
@@ -46,6 +46,7 @@
 
 #include "lldb/Host/posix/Fcntl.h"
 
+#include "llvm/Support/FileSystem.h"
 #include "llvm/Support/Threading.h"
 
 using namespace lldb;
@@ -362,8 +363,7 @@
 
   FileSpec working_dir = launch_info.GetWorkingDirectory();
   if (working_dir &&
-      (!working_dir.ResolvePath() ||
-       working_dir.GetFileType() != FileSpec::eFileTypeDirectory)) {
+      (!working_dir.ResolvePath() || !llvm::sys::fs::is_directory(working_dir.GetPath())) {
     error.SetErrorStringWithFormat("No such file or directory: %s",
                                    working_dir.GetCString());
     return error;