2 # This test checks that CallGraphSort ignores edges that would form "bad"
5 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-win32 %s -o %t
6 # RUN: echo "A C 1" > %t.call_graph
7 # RUN: echo "E B 4" >> %t.call_graph
8 # RUN: echo "C D 2" >> %t.call_graph
9 # RUN: echo "B D 1" >> %t.call_graph
10 # RUN: echo "F G 6" >> %t.call_graph
11 # RUN: echo "G H 5" >> %t.call_graph
12 # RUN: echo "H I 4" >> %t.call_graph
13 # RUN: lld-link /subsystem:console /entry:A %t /call-graph-ordering-file:%t.call_graph /out:%t2 /debug:symtab
14 # RUN: llvm-nm --numeric-sort %t2 | FileCheck %s
16 .section .text,"ax",one_only,A
21 .section .text,"ax",one_only,D
25 .section .text,"ax",one_only,E
29 .section .text,"ax",one_only,C
33 .section .text,"ax",one_only,B
37 .section .text,"ax",one_only,F
39 .fill (1024 * 1024) - 1, 1, 0
41 .section .text,"ax",one_only,G
45 .section .text,"ax",one_only,H
49 .section .text,"ax",one_only,I
53 # CHECK: 140001000 t H
54 # CHECK: 140001001 t I
55 # CHECK: 14000100e T A
56 # CHECK: 14000100f t C
57 # CHECK: 140001010 t E
58 # CHECK: 140001011 t B
59 # CHECK: 1400013f9 t D
60 # CHECK: 1400017e1 t F
61 # CHECK: 1401017e0 t G