[PATCH] D43389: [ThinLTO/gold] Perform cache pruning when cache directory specified

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 22 12:59:49 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL325830: [ThinLTO/gold] Perform cache pruning when cache directory specified (authored by tejohnson, committed by ).

Repository:
  rL LLVM

https://reviews.llvm.org/D43389

Files:
  llvm/trunk/test/tools/gold/X86/cache.ll
  llvm/trunk/tools/gold/gold-plugin.cpp


Index: llvm/trunk/tools/gold/gold-plugin.cpp
===================================================================
--- llvm/trunk/tools/gold/gold-plugin.cpp
+++ llvm/trunk/tools/gold/gold-plugin.cpp
@@ -1014,7 +1014,7 @@
   }
 
   // Prune cache
-  if (!options::cache_policy.empty()) {
+  if (!options::cache_dir.empty()) {
     CachePruningPolicy policy = check(parseCachePruningPolicy(options::cache_policy));
     pruneCache(options::cache_dir, policy);
   }
Index: llvm/trunk/test/tools/gold/X86/cache.ll
===================================================================
--- llvm/trunk/test/tools/gold/X86/cache.ll
+++ llvm/trunk/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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43389.135507.patch
Type: text/x-patch
Size: 1209 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180222/8a6013eb/attachment.bin>


More information about the llvm-commits mailing list