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/API/SBPlatform.cpp | |
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/API/SBPlatform.cpp')
-rw-r--r-- | lldb/source/API/SBPlatform.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lldb/source/API/SBPlatform.cpp b/lldb/source/API/SBPlatform.cpp index 33d430de8f9..0f1b99236a7 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 @@ SBError SBPlatform::Put(SBFileSpec &src, SBFileSpec &dst) { 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; |