[cfe-commits] r146260 - /cfe/trunk/lib/Serialization/ASTReader.cpp
Douglas Gregor
dgregor at apple.com
Fri Dec 9 08:22:07 PST 2011
Author: dgregor
Date: Fri Dec 9 10:22:07 2011
New Revision: 146260
URL: http://llvm.org/viewvc/llvm-project?rev=146260&view=rev
Log:
Use llvm::sys::fs::equivalent rather than comparing inodes, because
comparing inodes doesn't actually work on Windows.
Modified:
cfe/trunk/lib/Serialization/ASTReader.cpp
Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=146260&r1=146259&r2=146260&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Fri Dec 9 10:22:07 2011
@@ -1427,14 +1427,13 @@
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>
More information about the cfe-commits
mailing list