[ELF] Refine isExported/isPreemptible condition
[llvm-project.git] / lld / test / ELF / cgprofile-orderfile.s
blob584b2ecbe293af2bb7116750f62c013fd0efd67c
1 # REQUIRES: x86
3 # RUN: rm -rf %t && split-file %s %t && cd %t
4 # RUN: llvm-mc -filetype=obj -triple=x86_64 a.s -o a.o
6 # RUN: ld.lld -e A a.o --symbol-ordering-file=order --call-graph-profile-sort=hfsort -o out
7 # RUN: llvm-nm --numeric-sort out | FileCheck %s
8 # RUN: ld.lld -e A a.o --call-graph-profile-sort=hfsort -o out1
9 # RUN: llvm-nm --numeric-sort out1 | FileCheck %s --check-prefix=ONLY-CG
11 #--- order
15 #--- a.s
16 .section .text.D,"ax"; .globl D; D:
17 retq
19 .section .text.C,"ax"; .globl C; C:
20 call D
22 .section .text.B,"ax"; .globl B; B:
23 retq
25 .section .text.A,"ax"; .globl A; A:
26 call B
27 call C
29 .cg_profile A, B, 100
30 .cg_profile A, C, 40
31 .cg_profile C, D, 61
33 # CHECK: T B
34 # CHECK-NEXT: T A
35 # CHECK-NEXT: T C
36 # CHECK-NEXT: T D
38 # ONLY-CG: T A
39 # ONLY-CG-NEXT: T B
40 # ONLY-CG-NEXT: T C
41 # ONLY-CG-NEXT: T D