1## Check that BOLT preserves nop instruction if it's the only instruction 2## in a function. 3 4# REQUIRES: system-linux 5 6# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-linux %s -o %t.o 7# RUN: ld.lld %t.o -o %t.exe -q 8# RUN: llvm-bolt %t.exe -o %t.bolt.exe --relocs=0 9# RUN: llvm-objdump -d %t.bolt.exe | FileCheck %s 10 11 .text 12 .globl nop_function 13 .type nop_function,@function 14nop_function: 15 .cfi_startproc 16 nop 17# CHECK: <nop_function>: 18# CHECK-NEXT: nop 19 20 .size nop_function, .-nop_function 21 .cfi_endproc 22 23 24 .globl _start 25 .type _start,@function 26_start: 27 .cfi_startproc 28 call nop_function 29 .size _start, .-_start 30 .cfi_endproc 31