1; RegularLTO testcase
2; RUN: llvm-as %s -o %t.o
3; RUN: %gold -shared -m elf_x86_64 -o %t2 -plugin %llvmshlibdir/LLVMgold%shlibext \
4; RUN: %t.o --plugin-opt=save-temps -upatatino
5; RUN: llvm-dis < %t2.0.5.precodegen.bc | FileCheck %s
6
7; ThinLTO testcase
8; RUN: opt -module-summary %s -o %t.o
9; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \
10; RUN:     --plugin-opt=save-temps \
11; RUN:     --plugin-opt=thinlto -o %t2 %t.o
12; RUN: llvm-dis < %t.o.5.precodegen.bc | FileCheck --check-prefix=CHECKTHIN %s
13
14; Check that foo is not internalized
15; CHECK: define void @foo
16; CHECKTHIN: define dso_local void @foo
17
18target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
19target triple = "x86_64-unknown-linux-gnu"
20
21module asm ".global patatino"
22module asm ".equ patatino, foo"
23
24declare void @patatino()
25
26define void @foo() {
27  call void @patatino()
28  ret void
29}
30