2017-03-02 07:11:58 +08:00
|
|
|
; REQUIRES: x86
|
|
|
|
|
2017-03-02 07:00:10 +08:00
|
|
|
; RUN: opt -module-hash -module-summary %s -o %t.o
|
|
|
|
; RUN: opt -module-hash -module-summary %p/Inputs/cache.ll -o %t2.o
|
|
|
|
|
2017-03-17 10:24:16 +08:00
|
|
|
; RUN: rm -Rf %t.cache && mkdir %t.cache
|
2017-03-21 00:41:57 +08:00
|
|
|
; Create two files that would be removed by cache pruning due to age.
|
|
|
|
; We should only remove files matching the pattern "llvmcache-*".
|
|
|
|
; RUN: touch -t 197001011200 %t.cache/llvmcache-foo %t.cache/foo
|
2017-03-17 10:24:16 +08:00
|
|
|
; RUN: ld.lld --thinlto-cache-dir=%t.cache --thinlto-cache-policy prune_after=1h -o %t3 %t2.o %t.o
|
2017-03-02 07:00:10 +08:00
|
|
|
|
2017-03-21 00:41:57 +08:00
|
|
|
; Two cached objects, plus a timestamp file and "foo", minus the file we removed.
|
|
|
|
; RUN: ls %t.cache | count 4
|
2017-03-02 07:00:10 +08:00
|
|
|
|
|
|
|
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
|
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
|
|
|
|
define void @globalfunc() #0 {
|
|
|
|
entry:
|
|
|
|
ret void
|
|
|
|
}
|