Use llvm::sys::fs::UniqueID for windows and unix.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 1 Aug 2013 21:42:11 +0000 (21:42 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 1 Aug 2013 21:42:11 +0000 (21:42 +0000)
commitf8f91b897627773d5ecd484918e02d992c0d0c15
tree0103868083f454067f6812051ce73eee5dc4dc1e
parenta5c536e1ee25daef4567e1e2a24b74f373b82011
Use llvm::sys::fs::UniqueID for windows and unix.

This unifies the unix and windows versions of FileManager::UniqueDirContainer
and FileManager::UniqueFileContainer by using UniqueID.

We cannot just replace "struct stat" with llvm::sys::fs::file_status, since we
want to be able to construct fake ones, and file_status has different members
on unix and windows.

What the patch does is:

* Record only the information that clang is actually using.
* Use llvm::sys::fs::status instead of stat and fstat.
* Use llvm::sys::fs::UniqueID
* Delete the old windows versions of UniqueDirContainer and
UniqueFileContainer since the "unix" one now works on windows too.

llvm-svn: 187619
clang/include/clang/Basic/FileManager.h
clang/include/clang/Basic/FileSystemStatCache.h
clang/lib/Basic/FileManager.cpp
clang/lib/Basic/FileSystemStatCache.cpp
clang/lib/Frontend/CacheTokens.cpp
clang/lib/Frontend/TextDiagnostic.cpp
clang/lib/Lex/PTHLexer.cpp
clang/tools/libclang/CIndex.cpp
clang/tools/libclang/Indexing.cpp
clang/unittests/Basic/FileManagerTest.cpp