1; RUN: opt -module-hash -module-summary %s -o %t.bc 2; RUN: opt -module-hash -module-summary %p/Inputs/empty_module_with_cache.ll -o %t2.bc 3 4; Verify that enabling caching is working, even if the module is empty 5; RUN: rm -Rf %t.cache && mkdir %t.cache 6; RUN: llvm-lto -thinlto-action=run %t2.bc %t.bc -exported-symbol=main -thinlto-cache-dir %t.cache 7; RUN: ls %t.cache/llvmcache.timestamp 8; RUN: ls %t.cache | count 3 9 10; Verify that enabling caching is working with llvm-lto2 11; RUN: rm -Rf %t.cache 12; RUN: llvm-lto2 run -o %t.o %t2.bc %t.bc -cache-dir %t.cache \ 13; RUN: -r=%t2.bc,_main,plx 14; RUN: ls %t.cache | count 2 15 16; Same, but without hash, the index will be empty and caching should not happen 17 18; RUN: opt -module-summary %s -o %t.bc 19; RUN: opt -module-summary %p/Inputs/empty_module_with_cache.ll -o %t2.bc 20 21; Verify that caching is disabled for module without hash 22; RUN: rm -Rf %t.cache && mkdir %t.cache 23; RUN: llvm-lto -thinlto-action=run %t2.bc %t.bc -exported-symbol=main -thinlto-cache-dir %t.cache 24; RUN: ls %t.cache/llvmcache.timestamp 25; RUN: ls %t.cache | count 1 26 27; Verify that caching is disabled for module without hash, with llvm-lto2 28; RUN: rm -Rf %t.cache 29; RUN: llvm-lto2 run -o %t.o %t2.bc %t.bc -cache-dir %t.cache \ 30; RUN: -r=%t2.bc,_main,plx 31; RUN: ls %t.cache | count 0 32 33 34target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 35target triple = "x86_64-apple-macosx10.11.0" 36