1 ; Do setup work for all below tests: generate bitcode and combined index
2 ; RUN: opt -module-summary %s -o %t1.bc
3 ; RUN: opt -module-summary %p/Inputs/thinlto_funcimport.ll -o %t2.bc
5 ; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \
6 ; RUN: --plugin-opt=save-temps \
7 ; RUN: --plugin-opt=thinlto \
8 ; RUN: -shared %t1.bc %t2.bc -o %t
9 ; RUN: llvm-dis %t2.bc.3.import.bc -o - | FileCheck %s
10 ; CHECK: define available_externally void @foo()
12 ; We shouldn't do any importing at -O0
13 ; rm -f %t2.bc.3.import.bc
14 ; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \
15 ; RUN: --plugin-opt=save-temps \
16 ; RUN: --plugin-opt=thinlto \
17 ; RUN: --plugin-opt=O0 \
18 ; RUN: -shared %t1.bc %t2.bc -o %t
19 ; RUN: llvm-dis %t2.bc.3.import.bc -o - | FileCheck %s --check-prefix=CHECKO0
20 ; CHECKO0: declare void @foo(...)
22 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
23 target triple = "x86_64-unknown-linux-gnu"
25 define void @foo() #0 {