3 ; RUN: llvm-as %s -o %t.o
4 ; RUN: ld.lld %t.o -o %t.out -wrap=bar -save-temps
5 ; RUN: llvm-readobj --symbols %t.out | FileCheck %s
6 ; RUN: cat %t.out.resolution.txt | FileCheck -check-prefix=RESOLS %s
9 ; RUN: opt -module-summary %s -o %t.o
10 ; RUN: ld.lld %t.o -o %t.out -wrap=bar -save-temps
11 ; RUN: llvm-readobj --symbols %t.out | FileCheck %s
12 ; RUN: cat %t.out.resolution.txt | FileCheck -check-prefix=RESOLS %s
14 ; CHECK: Name: __wrap_bar
17 ; CHECK-NEXT: Binding: Global
18 ; CHECK-NEXT: Type: Function
20 ; Make sure that the 'r' (linker redefined) bit is set for bar and __real_bar
21 ; in the resolutions file. The calls to bar and __real_bar will be routed to
22 ; __wrap_bar and bar, respectively. So they cannot be inlined.
23 ; RESOLS: ,bar,xr{{$}}
24 ; RESOLS: ,__wrap_bar,plx{{$}}
25 ; RESOLS: ,__real_bar,plr{{$}}
27 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
28 target triple = "x86_64-unknown-linux-gnu"
32 define void @_start() {
37 define void @__wrap_bar() {
41 define void @__real_bar() {