diff options
| author | Pavel Labath <labath@google.com> | 2017-03-07 13:19:15 +0000 |
|---|---|---|
| committer | Pavel Labath <labath@google.com> | 2017-03-07 13:19:15 +0000 |
| commit | 30e6cbfcfca4836c2b3497d84ffc2043b548b2a6 (patch) | |
| tree | 3b24106c96c514a5490b04bfe541e2e6a2ac5518 /lldb/source/Target/ModuleCache.cpp | |
| parent | 3d0af578ccc071dc1f9fc1672af55a969e0beb5a (diff) | |
| download | bcm5719-llvm-30e6cbfcfca4836c2b3497d84ffc2043b548b2a6.tar.gz bcm5719-llvm-30e6cbfcfca4836c2b3497d84ffc2043b548b2a6.zip | |
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
Diffstat (limited to 'lldb/source/Target/ModuleCache.cpp')
| -rw-r--r-- | lldb/source/Target/ModuleCache.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lldb/source/Target/ModuleCache.cpp b/lldb/source/Target/ModuleCache.cpp index 123b6876af2..d01307c23e8 100644 --- a/lldb/source/Target/ModuleCache.cpp +++ b/lldb/source/Target/ModuleCache.cpp @@ -59,19 +59,15 @@ public: void Delete(); }; -static FileSpec JoinPath(const FileSpec &path1, const char *path2) { +FileSpec JoinPath(const FileSpec &path1, const char *path2) { FileSpec result_spec(path1); result_spec.AppendPathComponent(path2); return result_spec; } -static Error MakeDirectory(const FileSpec &dir_path) { - llvm::sys::fs::file_status st; - if (status(dir_path.GetPath(), st)) - return Error("Could not stat path"); - - if (exists(st)) { - if (!is_directory(st)) +Error MakeDirectory(const FileSpec &dir_path) { + if (dir_path.Exists()) { + if (!dir_path.IsDirectory()) return Error("Invalid existing path"); return Error(); |

