2 # Test the compatibility of ICF and cgprofile.
4 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-win32 %s -o %t
5 # RUN: echo "A B 100" > %t.call_graph
6 # RUN: echo "A C 40" >> %t.call_graph
7 # RUN: echo "C D 61" >> %t.call_graph
8 # RUN: lld-link /subsystem:console /entry:A %t /call-graph-ordering-file:%t.call_graph /out:%t2 /debug:symtab /opt:icf
9 # RUN: llvm-nm --numeric-sort %t2 | FileCheck %s
10 # RUN: lld-link /subsystem:console /entry:A %t /call-graph-ordering-file:%t.call_graph /out:%t2 /debug:symtab
11 # RUN: llvm-nm --numeric-sort %t2 | FileCheck %s --check-prefix=NOICF
13 .section .text,"x",one_only,D
19 .section .text,"x",one_only,C
25 .section .text,"x",one_only,B
31 .section .text,"x",one_only,A
37 # CHECK: 140001000 T A
38 # CHECK: 140001008 T C
39 # CHECK: 140001008 T D
40 # CHECK: 140001010 T B
42 # NOICF: 140001000 T A
43 # NOICF: 140001008 T B
44 # NOICF: 140001010 T C
45 # NOICF: 140001018 T D