blob: 239cfdf78dd72d5c8f31741f5e10a55d0d73ca2f [file] [log] [blame]
Mehdi Aminiab4a8b62016-05-14 05:16:41 +00001; RUN: opt -module-summary %s -o %t.bc
Mehdi Aminiadc0e262016-08-23 21:30:12 +00002; RUN: opt -module-summary %p/Inputs/cache.ll -o %t2.bc
Mehdi Aminiab4a8b62016-05-14 05:16:41 +00003
4; Verify that enabling caching is working
5; RUN: rm -Rf %t.cache && mkdir %t.cache
6; RUN: llvm-lto -thinlto-action=run -exported-symbol=globalfunc %t2.bc %t.bc -thinlto-cache-dir %t.cache
7; RUN: ls %t.cache/llvmcache.timestamp
8; RUN: ls %t.cache | count 3
9
Mehdi Aminiadc0e262016-08-23 21:30:12 +000010; Verify that enabling caching is working with llvm-lto2
11; RUN: rm -Rf %t.cache && mkdir %t.cache
12; RUN: llvm-lto2 -o %t.o %t2.bc %t.bc -cache-dir %t.cache \
13; RUN: -r=%t2.bc,_main,plx \
14; RUN: -r=%t2.bc,_globalfunc,lx \
15; RUN: -r=%t.bc,_globalfunc,plx
16; RUN: ls %t.cache | count 2
17
Mehdi Aminiab4a8b62016-05-14 05:16:41 +000018target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
19target triple = "x86_64-apple-macosx10.11.0"
20
21define void @globalfunc() #0 {
22entry:
23 ret void
24}