summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/test/tools/gold/X86/cache.ll6
-rw-r--r--llvm/tools/gold/gold-plugin.cpp2
2 files changed, 5 insertions, 3 deletions
diff --git a/llvm/test/tools/gold/X86/cache.ll b/llvm/test/tools/gold/X86/cache.ll
index 11c766be20c..51ffee282b1 100644
--- a/llvm/test/tools/gold/X86/cache.ll
+++ b/llvm/test/tools/gold/X86/cache.ll
@@ -8,7 +8,8 @@
; RUN: --plugin-opt=cache-dir=%t.cache \
; RUN: -o %t3.o %t2.o %t.o
-; RUN: ls %t.cache | count 0
+; We should just get the timestamp file
+; RUN: ls %t.cache | count 1
; Verify that enabling caching is working with module with hash.
@@ -22,7 +23,8 @@
; RUN: --plugin-opt=cache-dir=%t.cache \
; RUN: -o %t3.o %t2.o %t.o
-; RUN: ls %t.cache | count 2
+; Two cached objects, plus a timestamp file
+; RUN: ls %t.cache | count 3
; Create two files that would be removed by cache pruning due to age.
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp
index a28cf325685..19804a1ff12 100644
--- a/llvm/tools/gold/gold-plugin.cpp
+++ b/llvm/tools/gold/gold-plugin.cpp
@@ -1014,7 +1014,7 @@ static ld_plugin_status cleanup_hook(void) {
}
// Prune cache
- if (!options::cache_policy.empty()) {
+ if (!options::cache_dir.empty()) {
CachePruningPolicy policy = check(parseCachePruningPolicy(options::cache_policy));
pruneCache(options::cache_dir, policy);
}
OpenPOWER on IntegriCloud