brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · dc2a99f Raw
37 lines · plain
1; REQUIRES: x862; LTO3; RUN: llvm-as %s -o %t.obj4; RUN: lld-link -out:%t.exe %t.obj -entry:entry -subsystem:console -wrap:bar -debug:symtab -lldsavetemps5; RUN: cat %t.exe.resolution.txt | FileCheck -check-prefix=RESOLS %s6 7; ThinLTO8; RUN: opt -module-summary %s -o %t.obj9; RUN: lld-link -out:%t.exe %t.obj -entry:entry -subsystem:console -wrap:bar -debug:symtab -lldsavetemps10; RUN: cat %t.exe.resolution.txt | FileCheck -check-prefix=RESOLS %s11 12; Make sure that the 'r' (linker redefined) bit is set for bar and __real_bar13; in the resolutions file. The calls to bar and __real_bar will be routed to14; __wrap_bar and bar, respectively. So they cannot be inlined.15; RESOLS: ,bar,pxr{{$}}16; RESOLS: ,__real_bar,xr{{$}}17; RESOLS: ,__wrap_bar,px{{$}}18 19target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"20target triple = "x86_64-w64-windows-gnu"21 22define void @bar() {23  ret void24}25 26define void @entry() {27  call void @bar()28  ret void29}30 31declare void @__real_bar()32 33define void @__wrap_bar() {34  call void @__real_bar()35  ret void36}37