diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-12-09 16:22:07 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-12-09 16:22:07 +0000 |
commit | 99a922b6da21a474f8ed35f2b1a3bfd627900d1a (patch) | |
tree | 59e4da2a07095a7e1de217c6fdfd307aecbd7f22 /lib/Serialization/ASTReader.cpp | |
parent | 630821869c4ec4604ab479d66e5ff81147a858e1 (diff) |
Use llvm::sys::fs::equivalent rather than comparing inodes, because
comparing inodes doesn't actually work on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146260 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTReader.cpp')
-rw-r--r-- | lib/Serialization/ASTReader.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index c7393e4c78..44ffc29bad 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -1427,14 +1427,13 @@ bool HeaderFileInfoTrait::EqualKey(internal_key_type a, internal_key_type b) { if (llvm::sys::path::filename(a) != llvm::sys::path::filename(b)) return false; - - // The file names match, but the path names don't. stat() the files to - // see if they are the same. - struct stat StatBufA, StatBufB; - if (StatSimpleCache(a, &StatBufA) || StatSimpleCache(b, &StatBufB)) + + // Determine whether the actual files are equivalent. + bool Result = false; + if (llvm::sys::fs::equivalent(a, b, Result)) return false; - return StatBufA.st_ino == StatBufB.st_ino; + return Result; } std::pair<unsigned, unsigned> |