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/Core/ModuleList.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/Core/ModuleList.cpp')
-rw-r--r-- | lldb/source/Core/ModuleList.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lldb/source/Core/ModuleList.cpp b/lldb/source/Core/ModuleList.cpp index 0262185eed0..8ec3047dce8 100644 --- a/lldb/source/Core/ModuleList.cpp +++ b/lldb/source/Core/ModuleList.cpp @@ -26,7 +26,6 @@ #include "lldb/Symbol/VariableList.h" #include "lldb/Utility/Log.h" -#include "llvm/Support/FileSystem.h" #include "llvm/Support/Threading.h" using namespace lldb; @@ -767,8 +766,7 @@ Error ModuleList::GetSharedModule(const ModuleSpec &module_spec, auto search_path_spec = module_search_paths_ptr->GetFileSpecAtIndex(idx); if (!search_path_spec.ResolvePath()) continue; - namespace fs = llvm::sys::fs; - if (!fs::is_directory(search_path_spec.GetPath())) + if (!search_path_spec.Exists() || !search_path_spec.IsDirectory()) continue; search_path_spec.AppendPathComponent( module_spec.GetFileSpec().GetFilename().AsCString()); |