1821d7471SJustin Bogner# If we see the same function name, but with different hashes, make
2821d7471SJustin Bogner# sure we keep both.
3af3001e8SJustin Bogner
4821d7471SJustin Bogner# RUN: llvm-profdata merge %s -o %t 2>&1
5821d7471SJustin Bogner# RUN: llvm-profdata show %t -all-functions -counts > %t.out
6821d7471SJustin Bogner
7821d7471SJustin Bogner# The function ordering is non-deterministic, so we need to do our
8821d7471SJustin Bogner# checks in multiple runs.
9*b6d77e79SGeorgii Rymar# RUN: FileCheck -check-prefixes=FOO3,BOTH %s -input-file %t.out
10*b6d77e79SGeorgii Rymar# RUN: FileCheck -check-prefixes=FOO4,BOTH %s -input-file %t.out
11821d7471SJustin Bogner
12821d7471SJustin Bogner# FOO3: Hash: 0x{{0+}}3
13821d7471SJustin Bogner# FOO3-NEXT: Counters: 3
14821d7471SJustin Bogner# FOO3-NEXT: Function count: 1
15821d7471SJustin Bogner# FOO3-NEXT: Block counts: [2, 3]
16af3001e8SJustin Bognerfoo
17af3001e8SJustin Bogner3
18af3001e8SJustin Bogner3
19af3001e8SJustin Bogner1
20af3001e8SJustin Bogner2
21af3001e8SJustin Bogner3
22af3001e8SJustin Bogner
23821d7471SJustin Bogner# FOO4: Hash: 0x{{0+}}4
24821d7471SJustin Bogner# FOO4-NEXT: Counters: 4
25821d7471SJustin Bogner# FOO4-NEXT: Function count: 11
26821d7471SJustin Bogner# FOO4-NEXT: Block counts: [22, 33, 44]
27af3001e8SJustin Bognerfoo
28af3001e8SJustin Bogner4
29af3001e8SJustin Bogner4
30af3001e8SJustin Bogner11
31af3001e8SJustin Bogner22
32af3001e8SJustin Bogner33
33af3001e8SJustin Bogner44
34821d7471SJustin Bogner
35821d7471SJustin Bogner# BOTH: Total functions: 2
36821d7471SJustin Bogner# BOTH: Maximum function count: 11
37821d7471SJustin Bogner# BOTH: Maximum internal block count: 44
38