brintos

brintos / llvm-project-archived public Read only

0
0
Text · 884 B · 377d4da Raw
34 lines · plain
1## Check that llvm-bolt patches functions that are getting ignored after their2## CFG was constructed.3 4# RUN: %clang %cflags %s -o %t.exe -Wl,-q5# RUN: llvm-bolt %t.exe -o %t.bolt --force-patch 2>&1 | FileCheck %s6# RUN: llvm-objdump -d %t.bolt | FileCheck %s --check-prefix=CHECK-OBJDUMP7 8  .text9 10## The function is too small to be patched and BOLT is forced to ignore it under11## --force-patch. Check that the reference to _start is updated.12# CHECK: BOLT-WARNING: failed to patch entries in unpatchable13	.globl unpatchable14  .type unpatchable, %function15unpatchable:16  .cfi_startproc17# CHECK-OBJDUMP:      <unpatchable>:18# CHECK-OBJDUMP-NEXT: bl {{.*}} <_start>19  bl _start20  ret21  .cfi_endproc22  .size unpatchable, .-unpatchable23 24  .globl _start25  .type _start, %function26_start:27  .cfi_startproc28  cmp  x0, 129  b.eq  .L030.L0:31  ret  x3032  .cfi_endproc33  .size _start, .-_start34