blob: fe0d4fb4f6b54e75d659231026dcdc459d47c8d0 [file] [log] [blame]
Justin Bogner821d7472014-08-01 22:50:07 +00001# If we see the same function name, but with different hashes, make
2# sure we keep both.
Justin Bognercf36a362014-07-29 22:29:23 +00003
Justin Bogner821d7472014-08-01 22:50:07 +00004# RUN: llvm-profdata merge %s -o %t 2>&1
5# RUN: llvm-profdata show %t -all-functions -counts > %t.out
6
7# The function ordering is non-deterministic, so we need to do our
8# checks in multiple runs.
9# RUN: FileCheck -check-prefix=FOO3 -check-prefix=BOTH %s -input-file %t.out
10# RUN: FileCheck -check-prefix=FOO4 -check-prefix=BOTH %s -input-file %t.out
11
12# FOO3: Hash: 0x{{0+}}3
13# FOO3-NEXT: Counters: 3
14# FOO3-NEXT: Function count: 1
15# FOO3-NEXT: Block counts: [2, 3]
Justin Bognercf36a362014-07-29 22:29:23 +000016foo
173
183
191
202
213
22
Justin Bogner821d7472014-08-01 22:50:07 +000023# FOO4: Hash: 0x{{0+}}4
24# FOO4-NEXT: Counters: 4
25# FOO4-NEXT: Function count: 11
26# FOO4-NEXT: Block counts: [22, 33, 44]
Justin Bognercf36a362014-07-29 22:29:23 +000027foo
284
294
3011
3122
3233
3344
Justin Bogner821d7472014-08-01 22:50:07 +000034
35# BOTH: Total functions: 2
36# BOTH: Maximum function count: 11
37# BOTH: Maximum internal block count: 44