40 lines · plain
1## Tests whether llvm-bolt will correctly exit with error code and printing2## fatal error message in case one occurs. Here we test opening a function3## reordering file that does not exist.4 5# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o6# RUN: %clang %cflags %t.o -o %t.exe -Wl,-q7# RUN: not llvm-bolt %t.exe -o %t.null \8# RUN: --reorder-blocks=normal --reorder-functions=user \9# RUN: --function-order=/DOES/NOT/EXIST 2>&1 \10# RUN: | FileCheck --check-prefix=CHECK %s11 12# CHECK: FATAL BOLT-ERROR: Ordered functions file "/DOES/NOT/EXIST" can't be opened13 14# Sample function reordering input, based off function-order-lite.s15 .globl main16 .type main, %function17main:18 .cfi_startproc19.LBB06:20 callq func_a21 retq22 .cfi_endproc23.size main, .-main24 25 .globl func_a26 .type func_a, %function27func_a:28 .cfi_startproc29 retq30 .cfi_endproc31.size func_a, .-func_a32 33 .globl func_b34 .type func_b, %function35func_b:36 .cfi_startproc37 retq38 .cfi_endproc39.size func_b, .-func_b40