18e13bc45SMehdi Amini; RUN: opt -module-hash -module-summary %s -o %t.bc 28e13bc45SMehdi Amini; RUN: opt -module-hash -module-summary %p/Inputs/cache.ll -o %t2.bc 38e13bc45SMehdi Amini 48e13bc45SMehdi Amini; Check that the generating object files is working without cache 58e13bc45SMehdi Amini; RUN: rm -Rf %t.thin.out 68e13bc45SMehdi Amini; RUN: llvm-lto -thinlto-save-objects=%t.thin.out -thinlto-action=run %t2.bc %t.bc -exported-symbol=main 78e13bc45SMehdi Amini; RUN: ls %t.thin.out | count 2 88e13bc45SMehdi Amini 98e13bc45SMehdi Amini; Same with cache 108e13bc45SMehdi Amini; RUN: rm -Rf %t.thin.out 118e13bc45SMehdi Amini; RUN: rm -Rf %t.cache && mkdir %t.cache 128e13bc45SMehdi Amini; RUN: llvm-lto -thinlto-save-objects=%t.thin.out -thinlto-action=run %t2.bc %t.bc -exported-symbol=main -thinlto-cache-dir %t.cache 138e13bc45SMehdi Amini; RUN: ls %t.thin.out | count 2 148e13bc45SMehdi Amini; RUN: ls %t.cache | count 3 158e13bc45SMehdi Amini 168e13bc45SMehdi Amini; Same with hot cache 178e13bc45SMehdi Amini; RUN: rm -Rf %t.thin.out 188e13bc45SMehdi Amini; RUN: rm -Rf %t.cache && mkdir %t.cache 198e13bc45SMehdi Amini; RUN: llvm-lto -thinlto-save-objects=%t.thin.out -thinlto-action=run %t2.bc %t.bc -exported-symbol=main -thinlto-cache-dir %t.cache 208e13bc45SMehdi Amini; RUN: ls %t.thin.out | count 2 218e13bc45SMehdi Amini; RUN: ls %t.cache | count 3 228e13bc45SMehdi Amini 236c9f6fd1SSteven Wu; Check the name of object in directory has arch name included. 246c9f6fd1SSteven Wu; RUN: ls %t.thin.out | grep x86_64.thinlto.o | count 2 256c9f6fd1SSteven Wu 268e13bc45SMehdi Amini 27*7b1d7937SAmy Huangtarget datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 288e13bc45SMehdi Aminitarget triple = "x86_64-apple-macosx10.11.0" 298e13bc45SMehdi Amini 308e13bc45SMehdi Aminidefine void @globalfunc() #0 { 318e13bc45SMehdi Aminientry: 328e13bc45SMehdi Amini ret void 338e13bc45SMehdi Amini} 34