diff options
Diffstat (limited to 'test/ELF/lto/cache.ll')
-rw-r--r-- | test/ELF/lto/cache.ll | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ELF/lto/cache.ll b/test/ELF/lto/cache.ll index 55e3a3d6f6cd4..6731f522606f6 100644 --- a/test/ELF/lto/cache.ll +++ b/test/ELF/lto/cache.ll @@ -12,6 +12,17 @@ ; Two cached objects, plus a timestamp file and "foo", minus the file we removed. ; RUN: ls %t.cache | count 4 +; Create a file of size 64KB. +; RUN: %python -c "print(' ' * 65536)" > %t.cache/llvmcache-foo + +; This should leave the file in place. +; RUN: ld.lld --thinlto-cache-dir=%t.cache --thinlto-cache-policy cache_size_bytes=128k -o %t3 %t2.o %t.o +; RUN: ls %t.cache | count 5 + +; This should remove it. +; RUN: ld.lld --thinlto-cache-dir=%t.cache --thinlto-cache-policy cache_size_bytes=32k -o %t3 %t2.o %t.o +; RUN: ls %t.cache | count 4 + target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" |