1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/test/LTO/Resolution/X86/ifunc2.ll
Peter Collingbourne c349d0b828 Linker: Add support for GlobalIFunc.
GlobalAlias and GlobalIFunc ought to be treated the same by the IR
linker, so we can generalize the code to be in terms of their common
base class GlobalIndirectSymbol.

Differential Revision: https://reviews.llvm.org/D55046

llvm-svn: 368357
2019-08-08 22:09:18 +00:00

20 lines
602 B
LLVM

; RUN: llvm-as -o %t1.o %s
; RUN: llvm-as -o %t2.o %S/Inputs/ifunc2.ll
; RUN: llvm-lto2 run %t1.o %t2.o -r %t1.o,foo,p -r %t1.o,foo_resolver, -r %t2.o,foo_resolver,p -save-temps -o %t3.o
; RUN: llvm-dis -o - %t3.o.0.0.preopt.bc | FileCheck %s
target datalayout = "e-p:64:64"
target triple = "x86_64-unknown-linux-gnu"
; CHECK: @foo = ifunc i32 (), i32 ()* @foo_resolver.2
@foo = ifunc i32 (), i32 ()* @foo_resolver
; CHECK: define internal i32 @foo_resolver.2() {
; CHECK-NEXT: ret i32 1
define weak i32 @foo_resolver() {
ret i32 1
}
; CHECK: define i32 @foo_resolver() {
; CHECK-NEXT: ret i32 2