]> granicus.if.org Git - clang/commitdiff
Remove sign-compare warning on systems that still use 32 bit time_ts.
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 29 Mar 2013 17:39:43 +0000 (17:39 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 29 Mar 2013 17:39:43 +0000 (17:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178351 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/CompilerInstance.cpp

index 0a8588375be6d3d210d0d382329e9880a9f3592f..0c63910ace5c88b321331a3bca86d3f90ce15fc2 100644 (file)
@@ -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;
       }