29 lines · plain
1; Do setup work for all below tests: generate bitcode and combined index2; RUN: opt -module-summary %s -o %t1.bc3; RUN: opt -module-summary %p/Inputs/thinlto_funcimport.ll -o %t2.bc4 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 %t9; RUN: llvm-dis %t2.bc.3.import.bc -o - | FileCheck %s10; CHECK: define available_externally void @foo()11 12; We shouldn't do any importing at -O013; rm -f %t2.bc.3.import.bc14; 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 %t19; RUN: llvm-dis %t2.bc.3.import.bc -o - | FileCheck %s --check-prefix=CHECKO020; CHECKO0: declare void @foo(...)21 22target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"23target triple = "x86_64-unknown-linux-gnu"24 25define void @foo() #0 {26entry:27 ret void28}29