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 | e32e054279766f16dd26e98a2db6e78dc1e20ba7 (patch) | |
tree | 24be109b92b7777f18094f077470c0a6d7920ca4 /clang | |
parent | 0c3532630291f33a75d9dabc74a3099af1eb8068 (diff) | |
download | bcm5719-llvm-e32e054279766f16dd26e98a2db6e78dc1e20ba7.tar.gz bcm5719-llvm-e32e054279766f16dd26e98a2db6e78dc1e20ba7.zip |
Use llvm::sys::fs::equivalent rather than comparing inodes, because
comparing inodes doesn't actually work on Windows.
llvm-svn: 146260
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/Serialization/ASTReader.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index c7393e4c78c..44ffc29bad2 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/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> |