Mehdi Amini | ab4a8b6 | 2016-05-14 05:16:41 +0000 | [diff] [blame] | 1 | ; RUN: opt -module-summary %s -o %t.bc |
Mehdi Amini | adc0e26 | 2016-08-23 21:30:12 +0000 | [diff] [blame^] | 2 | ; RUN: opt -module-summary %p/Inputs/cache.ll -o %t2.bc |
Mehdi Amini | ab4a8b6 | 2016-05-14 05:16:41 +0000 | [diff] [blame] | 3 | |
| 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 Amini | adc0e26 | 2016-08-23 21:30:12 +0000 | [diff] [blame^] | 10 | ; 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 Amini | ab4a8b6 | 2016-05-14 05:16:41 +0000 | [diff] [blame] | 18 | target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" |
| 19 | target triple = "x86_64-apple-macosx10.11.0" |
| 20 | |
| 21 | define void @globalfunc() #0 { |
| 22 | entry: |
| 23 | ret void |
| 24 | } |