diff options
| author | Zachary Turner <zturner@google.com> | 2017-03-07 03:43:17 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2017-03-07 03:43:17 +0000 |
| commit | 990e3cd8e25970e477840d81972290858caffd50 (patch) | |
| tree | 50278a2ce428ac02066aa7611cbe42cc89b11e6e /lldb/source/Plugins/Process/Linux | |
| parent | 06ec03c2110e1a17271699a95ba28b0a56d9e17b (diff) | |
| download | bcm5719-llvm-990e3cd8e25970e477840d81972290858caffd50.tar.gz bcm5719-llvm-990e3cd8e25970e477840d81972290858caffd50.zip | |
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
Diffstat (limited to 'lldb/source/Plugins/Process/Linux')
| -rw-r--r-- | lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp index 05276294f0e..a3df09cdc4f 100644 --- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -49,6 +49,7 @@ #include "ProcFileReader.h" #include "Procfs.h" +#include "llvm/Support/FileSystem.h" #include "llvm/Support/Threading.h" #include <linux/unistd.h> @@ -224,9 +225,8 @@ Error NativeProcessProtocol::Launch( // Verify the working directory is valid if one was specified. FileSpec working_dir{launch_info.GetWorkingDirectory()}; - if (working_dir && - (!working_dir.ResolvePath() || - working_dir.GetFileType() != FileSpec::eFileTypeDirectory)) { + if (working_dir && (!working_dir.ResolvePath() || + !llvm::sys::fs::is_directory(working_dir.GetPath()))) { error.SetErrorStringWithFormat("No such file or directory: %s", working_dir.GetCString()); return error; |

