summaryrefslogtreecommitdiffstats
path: root/llvm/test/ThinLTO
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2017-03-20 16:41:57 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2017-03-20 16:41:57 +0000
commit25a17ba4c7cae20b301e01c6654c272fe38314b9 (patch)
tree5dd3af1e8aee5ca2f1c04b3be25ff320d90b2723 /llvm/test/ThinLTO
parente593049fb057a014e912973e8717463e060c9d60 (diff)
downloadbcm5719-llvm-25a17ba4c7cae20b301e01c6654c272fe38314b9.tar.gz
bcm5719-llvm-25a17ba4c7cae20b301e01c6654c272fe38314b9.zip
Support, LTO: When pruning a directory, ignore files matching a prefix.
This is a safeguard against data loss if the user specifies a directory that is not a cache directory. Teach the existing cache pruning clients to create files with appropriate names. Differential Revision: https://reviews.llvm.org/D31109 llvm-svn: 298271
Diffstat (limited to 'llvm/test/ThinLTO')
-rw-r--r--llvm/test/ThinLTO/X86/cache.ll10
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/test/ThinLTO/X86/cache.ll b/llvm/test/ThinLTO/X86/cache.ll
index d654d3468e3..426654f31d2 100644
--- a/llvm/test/ThinLTO/X86/cache.ll
+++ b/llvm/test/ThinLTO/X86/cache.ll
@@ -23,11 +23,16 @@
; RUN: opt -module-hash -module-summary %s -o %t.bc
; RUN: opt -module-hash -module-summary %p/Inputs/cache.ll -o %t2.bc
-; Verify that enabling caching is working
+; Verify that enabling caching is working, and that the pruner only removes
+; files matching the pattern "llvmcache-*".
; RUN: rm -Rf %t.cache && mkdir %t.cache
+; RUN: touch -t 197001011200 %t.cache/llvmcache-foo %t.cache/foo
; RUN: llvm-lto -thinlto-action=run -exported-symbol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache
+; RUN: ls %t.cache | count 4
; RUN: ls %t.cache/llvmcache.timestamp
-; RUN: ls %t.cache | count 3
+; RUN: ls %t.cache/foo
+; RUN: not ls %t.cache/llvmcache-foo
+; RUN: ls %t.cache/llvmcache-* | count 2
; Verify that enabling caching is working with llvm-lto2
; RUN: rm -Rf %t.cache
@@ -36,6 +41,7 @@
; RUN: -r=%t2.bc,_globalfunc,lx \
; RUN: -r=%t.bc,_globalfunc,plx
; RUN: ls %t.cache | count 2
+; RUN: ls %t.cache/llvmcache-* | count 2
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.11.0"
OpenPOWER on IntegriCloud