1 ; Generate summary sections 2 ; RUN: opt -module-summary %s -o %t.o 3 ; RUN: opt -module-summary %p/Inputs/thinlto_archive1.ll -o %t2.o 4 ; RUN: opt -module-summary %p/Inputs/thinlto_archive2.ll -o %t3.o 5 6 ; Generate the static library 7 ; RUN: llvm-ar r %t.a %t2.o %t3.o 8 9 ; Test importing from archive library via gold, using jobs=1 to ensure 10 ; output messages are not interleaved. 11 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \ 12 ; RUN: --plugin-opt=thinlto \ 13 ; RUN: --plugin-opt=-print-imports \ 14 ; RUN: --plugin-opt=jobs=1 \ 15 ; RUN: -shared %t.o %t.a -o %t4 2>&1 | FileCheck %s 16 ; RUN: llvm-nm %t4 | FileCheck %s --check-prefix=NM 17 18 ; CHECK-DAG: Import g 19 declare void @g(...) 20 ; CHECK-DAG: Import h 21 declare void @h(...) 22 23 ; NM: T f 24 define void @f() { 25 entry: 26 call void (...) @g() 27 call void (...) @h() 28 ret void 29 } 30