mirror of
https://github.com/intel/llvm.git
synced 2026-01-14 03:50:17 +08:00
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
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
// C Includes
|
||||
// C++ Includes
|
||||
// Other libraries and framework includes
|
||||
#include "llvm/Support/FileSystem.h"
|
||||
#include "llvm/Support/Signals.h"
|
||||
#include "llvm/Support/raw_os_ostream.h"
|
||||
|
||||
@@ -1440,7 +1439,7 @@ void Module::SetSymbolFileFileSpec(const FileSpec &file) {
|
||||
// ("/tmp/a.out.dSYM/Contents/Resources/DWARF/a.out"). So we need to
|
||||
// check this
|
||||
|
||||
if (llvm::sys::fs::is_directory(file.GetPath())) {
|
||||
if (file.IsDirectory()) {
|
||||
std::string new_path(file.GetPath());
|
||||
std::string old_path(obj_file->GetFileSpec().GetPath());
|
||||
if (old_path.find(new_path) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user