1 ; Do setup work for all below tests: generate bitcode and combined index
2 ; RUN: opt -module-summary %s -o %t.main.bc
3 ; RUN: opt -module-summary %p/Inputs/noinline.ll -o %t.inputs.noinline.bc
4 ; RUN: llvm-lto -thinlto -o %t.summary %t.main.bc %t.inputs.noinline.bc
6 ; Attempt the import now, ensure below that file containing noinline
7 ; is not imported by default but imported with -force-import-all.
9 ; RUN: opt -function-import -summary-file %t.summary.thinlto.bc %t.main.bc -S 2>&1 \
10 ; RUN: | FileCheck -check-prefix=NOIMPORT %s
11 ; RUN: opt -function-import -force-import-all -summary-file %t.summary.thinlto.bc \
12 ; RUN: %t.main.bc -S 2>&1 | FileCheck -check-prefix=IMPORT %s
14 define i32 @main() #0 {
16 %f = alloca i64, align 8
17 call void @foo(i64* %f)
21 ; NOIMPORT: declare void @foo(i64*)
22 ; IMPORT: define available_externally void @foo
23 declare void @foo(i64*) #1