1 ; RUN: llvm-profdata merge --sample --convert-sample-profile-layout=flat --text %S/Inputs/sample-flatten-profile.proftext -o - | FileCheck %s --match-full-lines --strict-whitespace
2 ; RUN: llvm-profdata merge --sample --extbinary %S/Inputs/sample-flatten-profile.proftext -o %t2 && llvm-profdata merge --sample --convert-sample-profile-layout=flat --text %t2 -o - | FileCheck %s --match-full-lines --strict-whitespace
4 ; RUN: llvm-profdata merge --sample --convert-sample-profile-layout=flat --text %S/Inputs/sample-flatten-profile-cs.proftext -o - | FileCheck %s --match-full-lines --strict-whitespace --check-prefix=CHECK-CS
5 ; RUN: llvm-profdata merge --sample --extbinary %S/Inputs/sample-flatten-profile-cs.proftext -o %t2 && llvm-profdata merge --sample --convert-sample-profile-layout=flat --text %t2 -o - | FileCheck %s --match-full-lines --strict-whitespace --check-prefix=CHECK-CS
10 ; CHECK-NEXT: 4: 36 corge:15 quux:13 qux:8
11 ; CHECK-NEXT: 4.1: 12 thud:5 grault:4 quux:3
12 ; CHECK-NEXT: 5: 20 foo:20
13 ; CHECK-NEXT: 6: 2 bar:2
15 ; CHECK-NEXT: !CFGChecksum: 1
16 ; CHECK-NEXT: !Attributes: 1
17 ; CHECK-NEXT:foo:134:21
19 ; CHECK-NEXT: 3: 12 bar:11
21 ; CHECK-NEXT: !CFGChecksum: 3
22 ; CHECK-NEXT: !Attributes: 3
23 ; CHECK-NEXT:main:104:1
27 ; CHECK-NEXT: 9: 3 bar:2 foo:1
28 ; CHECK-NEXT: 10: 16 baz:15 foo:1
29 ; CHECK-NEXT: !CFGChecksum: 2
30 ; CHECK-NEXT: !Attributes: 2
31 ; CHECK-NEXT:bar:15:14
34 ; CHECK-NEXT: !CFGChecksum: 4
35 ; CHECK-NEXT: !Attributes: 4
38 ; CHECK-CS-NEXT: 1: 10
39 ; CHECK-CS-NEXT: 3: 20
40 ; CHECK-CS-NEXT: 5: 20 foo:20
41 ; CHECK-CS-NEXT:foo:104:2
43 ; CHECK-CS-NEXT: 3: 2 bar:1
45 ; CHECK-CS-NEXT:main:91:1
47 ; CHECK-CS-NEXT: 4.2: 1
49 ; CHECK-CS-NEXT: 9: 3 bar:2 foo:1
50 ; CHECK-CS-NEXT: 10: 3 baz:2 foo:1
51 ; CHECK-CS-NEXT:bar:2:2