• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llvm-as -o %t1.o %s
2; RUN: llvm-as -o %t2.o %S/Inputs/ifunc2.ll
3; 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
4; RUN: llvm-dis -o - %t3.o.0.0.preopt.bc | FileCheck %s
5
6target datalayout = "e-p:64:64"
7target triple = "x86_64-unknown-linux-gnu"
8
9; CHECK: @foo = ifunc i32 (), i32 ()* @foo_resolver.2
10@foo = ifunc i32 (), i32 ()* @foo_resolver
11
12; CHECK: define internal i32 @foo_resolver.2() {
13; CHECK-NEXT: ret i32 1
14define weak i32 @foo_resolver() {
15  ret i32 1
16}
17
18; CHECK: define i32 @foo_resolver() {
19; CHECK-NEXT: ret i32 2
20