brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · 3e1c652 Raw
67 lines · plain
1// REQUIRES: x862// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o3// RUN: ld.lld -e A %t.o --no-call-graph-profile-sort -o %t4// RUN: llvm-nm --numeric-sort %t | FileCheck %s --check-prefix=NO_ORDERING5// NO_ORDERING:         0000000000201120 t D6// NO_ORDERING-NEXT:    0000000000201121 T C7// NO_ORDERING-NEXT:    0000000000201122 T B8// NO_ORDERING-NEXT:    0000000000201123 T A9 10// RUN: ld.lld -e A %t.o -o %t11// RUN: llvm-nm --numeric-sort %t | FileCheck %s --check-prefix=CALL_GRAPH12// CALL_GRAPH:		0000000000201120 T A13// CALL_GRAPH-NEXT:	0000000000201120 t Aa14// CALL_GRAPH-NEXT:	0000000000201121 T B15// CALL_GRAPH-NEXT:	0000000000201122 T C16// CALL_GRAPH-NEXT:	0000000000201123 t D17 18// RUN: rm -f %t.symbol_order19// RUN: echo "C" >> %t.symbol_order20// RUN: echo "B" >> %t.symbol_order21// RUN: echo "D" >> %t.symbol_order22// RUN: echo "A" >> %t.symbol_order23 24// RUN: ld.lld -e A %t.o --symbol-ordering-file %t.symbol_order -o %t25// RUN: llvm-nm --numeric-sort %t | FileCheck %s --check-prefix=SYMBOL_ORDER26// SYMBOL_ORDER:	0000000000201120 T C27// SYMBOL_ORDER-NEXT:	0000000000201121 T B28// SYMBOL_ORDER-NEXT:	0000000000201122 t D29// SYMBOL_ORDER-NEXT:	0000000000201123 T A30 31// RUN: rm -f %t.call_graph32// RUN: echo "A B 5" > %t.call_graph33// RUN: echo "B C 50" >> %t.call_graph34// RUN: echo "C D 40" >> %t.call_graph35// RUN: echo "D B 10" >> %t.call_graph36 37// RUN: not ld.lld -e A %t.o --symbol-ordering-file %t.symbol_order --call-graph-ordering-file %t.call_graph -o /dev/null 2>&1 | FileCheck %s38// RUN: not ld.lld -e A %t.o --call-graph-ordering-file %t.call_graph --symbol-ordering-file %t.symbol_order -o /dev/null 2>&1 | FileCheck %s39// CHECK: error: --symbol-ordering-file and --call-graph-order-file may not be used together40 41    .section    .text.D,"ax",@progbits42D:43    retq44 45    .section    .text.C,"ax",@progbits46    .globl  C47C:48    retq49 50    .section    .text.B,"ax",@progbits51    .globl  B52B:53    retq54 55    .section    .text.A,"ax",@progbits56    .globl  A57A:58Aa:59    retq60 61    .cg_profile A, B, 1062    .cg_profile A, B, 1063    .cg_profile Aa, B, 8064    .cg_profile A, C, 4065    .cg_profile B, C, 3066    .cg_profile C, D, 9067