aboutsummaryrefslogtreecommitdiff
path: root/test/tools/gold/X86/asm_undefined2.ll
blob: d6ed55a775a634a346f3c80e4fa124c7f98ab980 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
; RegularLTO testcase
; RUN: llvm-as %s -o %t.o
; RUN: %gold -shared -m elf_x86_64 -o %t2 -plugin %llvmshlibdir/LLVMgold.so \
; RUN: %t.o --plugin-opt=save-temps -upatatino
; RUN: llvm-dis < %t2.0.5.precodegen.bc | FileCheck %s

; ThinLTO testcase
; RUN: opt -module-summary %s -o %t.o
; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold.so \
; RUN:     --plugin-opt=save-temps \
; RUN:     --plugin-opt=thinlto -o %t2 %t.o
; RUN: llvm-dis < %t.o.5.precodegen.bc | FileCheck --check-prefix=CHECKTHIN %s

; Check that foo is not internalized
; CHECK: define void @foo
; CHECKTHIN: define dso_local void @foo

target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

module asm ".global patatino"
module asm ".equ patatino, foo"

declare void @patatino()

define void @foo() {
  call void @patatino()
  ret void
}