3 ; RUN: llvm-as %s -o %t.obj
4 ; RUN: lld-link -out:%t.exe %t.obj -entry:entry -subsystem:console -wrap:bar -debug:symtab -lldsavetemps
5 ; RUN: cat %t.exe.resolution.txt | FileCheck -check-prefix=RESOLS %s
8 ; RUN: opt -module-summary %s -o %t.obj
9 ; RUN: lld-link -out:%t.exe %t.obj -entry:entry -subsystem:console -wrap:bar -debug:symtab -lldsavetemps
10 ; RUN: cat %t.exe.resolution.txt | FileCheck -check-prefix=RESOLS %s
12 ; Make sure that the 'r' (linker redefined) bit is set for bar and __real_bar
13 ; in the resolutions file. The calls to bar and __real_bar will be routed to
14 ; __wrap_bar and bar, respectively. So they cannot be inlined.
15 ; RESOLS: ,bar,pxr{{$}}
16 ; RESOLS: ,__real_bar,xr{{$}}
17 ; RESOLS: ,__wrap_bar,px{{$}}
19 target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
20 target triple = "x86_64-w64-windows-gnu"
26 define void @entry() {
31 declare void @__real_bar()
33 define void @__wrap_bar() {
34 call void @__real_bar()