diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-03-29 17:39:43 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-03-29 17:39:43 +0000 |
commit | 93ce7d59f0ce9d85301cbad96a71694e4f345fcd (patch) | |
tree | 41776290649f830a88ea1ff50e58e1cf643d8458 /lib/Frontend | |
parent | 5b34b9c5135971b01ed0dc8d4ef35cd3b79bd2c0 (diff) |
Remove sign-compare warning on systems that still use 32 bit time_ts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178351 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend')
-rw-r--r-- | lib/Frontend/CompilerInstance.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index 0a8588375b..0c63910ace 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/lib/Frontend/CompilerInstance.cpp @@ -1029,9 +1029,8 @@ static void pruneModuleCache(const HeaderSearchOptions &HSOpts) { // If not, do nothing. time_t TimeStampModTime = StatBuf.st_mtime; time_t CurrentTime = time(0); - if (CurrentTime - TimeStampModTime <= HSOpts.ModuleCachePruneInterval) { + if (CurrentTime - TimeStampModTime <= time_t(HSOpts.ModuleCachePruneInterval)) return; - } // Write a new timestamp file so that nobody else attempts to prune. // There is a benign race condition here, if two Clang instances happen to @@ -1071,8 +1070,9 @@ static void pruneModuleCache(const HeaderSearchOptions &HSOpts) { // If the file has been used recently enough, leave it there. time_t FileAccessTime = StatBuf.st_atime; - if (CurrentTime - FileAccessTime <= HSOpts.ModuleCachePruneAfter) { - RemovedAllFiles = false;; + if (CurrentTime - FileAccessTime <= + time_t(HSOpts.ModuleCachePruneAfter)) { + RemovedAllFiles = false; continue; } |