44 lines · plain
1# REQUIRES: x862# Test correctness of call graph ordering.3 4# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-win32 %s -o %t5# RUN: lld-link /subsystem:console /entry:A %t /out:%t2 /debug:symtab6# RUN: llvm-nm --numeric-sort %t2 | FileCheck %s --check-prefix=NOSORT 7 8# RUN: echo "A B 5" > %t.call_graph9# RUN: echo "B C 50" >> %t.call_graph10# RUN: echo "C D 40" >> %t.call_graph11# RUN: echo "D B 10" >> %t.call_graph12# RUN: lld-link /subsystem:console /entry:A %t /call-graph-ordering-file:%t.call_graph /out:%t2 /debug:symtab13# RUN: llvm-nm --numeric-sort %t2 | FileCheck %s 14 15# NOSORT: 140001000 T A16# NOSORT: 140001001 T B17# NOSORT: 140001002 T C18# NOSORT: 140001003 T D19 20# CHECK: 140001000 T B21# CHECK: 140001001 T C22# CHECK: 140001002 T D23# CHECK: 140001003 T A24 25.section .text, "x", one_only, A26.globl A27A:28 nop29 30.section .text, "x", one_only, B31.globl B32B:33 nop34 35.section .text, "x", one_only, C36.globl C37C:38 nop39 40.section .text, "x", one_only, D41.globl D42D:43 nop44