1; REQUIRES: x86
2; NetBSD: noatime mounts currently inhibit 'touch' from updating atime
3; UNSUPPORTED: system-netbsd
4
5; RUN: opt -module-hash -module-summary %s -o %t.o
6; RUN: opt -module-hash -module-summary %p/Inputs/lto-cache.ll -o %t2.o
7
8; RUN: rm -Rf %t.cache && mkdir %t.cache
9; Create two files that would be removed by cache pruning due to age.
10; We should only remove files matching the pattern "llvmcache-*".
11; RUN: touch -t 197001011200 %t.cache/llvmcache-foo %t.cache/foo
12; RUN: lld-link /lldltocache:%t.cache /lldltocachepolicy:prune_after=1h /out:%t3 /entry:main %t2.o %t.o
13
14; Two cached objects, plus a timestamp file and "foo", minus the file we removed.
15; RUN: ls %t.cache | count 4
16
17target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
18target triple = "x86_64-pc-windows-msvc"
19
20define void @globalfunc() #0 {
21entry:
22  ret void
23}
24