summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-03-29 17:39:43 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-03-29 17:39:43 +0000
commitdbcf50376e9664cadcedb501e6e8105d2ef72063 (patch)
treeef30aff680d565be5fc4aea2b6576577354bc7b4 /clang/lib/Frontend/CompilerInstance.cpp
parent84718fde7aa610b1eef952f7dfebdfc9f25af6da (diff)
downloadbcm5719-llvm-dbcf50376e9664cadcedb501e6e8105d2ef72063.tar.gz
bcm5719-llvm-dbcf50376e9664cadcedb501e6e8105d2ef72063.zip
Remove sign-compare warning on systems that still use 32 bit time_ts.
llvm-svn: 178351
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 0a8588375be..0c63910ace5 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/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;
}
OpenPOWER on IntegriCloud