1 ; Do setup work for all below tests: generate bitcode and combined index 2 ; RUN: opt -module-summary %s -o %t.bc 3 ; RUN: opt -module-summary %p/Inputs/funcimport_alias.ll -o %t2.bc 4 ; RUN: llvm-lto -thinlto -o %t3 %t.bc %t2.bc 5 6 ; Do the import now. Ensures that the importer handles an external call 7 ; from imported callanalias() to a function that is defined already in 8 ; the dest module, but as an alias. 9 ; RUN: opt -function-import -summary-file %t3.thinlto.bc %t.bc -S | FileCheck %s 10 11 define i32 @main() #0 { 12 entry: 13 call void @callanalias() 14 ret i32 0 15 } 16 17 @analias = alias void (), void ()* @globalfunc 18 19 define void @globalfunc() #0 { 20 entry: 21 ret void 22 } 23 24 declare void @callanalias() #1 25 ; CHECK-DAG: define available_externally void @callanalias() 26