RUN: llvm-profdata generate %p/Inputs/empty.profdata.input | llvm-profdata show -all-functions -counts - | FileCheck %s --check-prefix=EMPTY EMPTY: Total functions: 0 EMPTY: Maximum function count: 0 EMPTY: Maximum internal block count: 0 RUN: llvm-profdata generate %p/Inputs/foo3-1.profdata.input | llvm-profdata show -all-functions -counts - | FileCheck %s --check-prefix=FOO3 FOO3: foo: FOO3: Counters: 3 FOO3: Function count: 1 FOO3: Block counts: [2, 3] FOO3: Total functions: 1 FOO3: Maximum function count: 1 FOO3: Maximum internal block count: 3 RUN: llvm-profdata generate %p/Inputs/foo3bar3-1.profdata.input | llvm-profdata show -all-functions -counts - | FileCheck %s --check-prefix=FOO3BAR3 FOO3BAR3: foo: FOO3BAR3: Counters: 3 FOO3BAR3: Function count: 2 FOO3BAR3: Block counts: [3, 5] FOO3BAR3: bar: FOO3BAR3: Counters: 3 FOO3BAR3: Function count: 7 FOO3BAR3: Block counts: [11, 13] FOO3BAR3: Total functions: 2 FOO3BAR3: Maximum function count: 7 FOO3BAR3: Maximum internal block count: 13 RUN: not llvm-profdata generate %p/Inputs/invalid-count-later.profdata.input -o /dev/null 2>&1 | FileCheck %s --check-prefix=INVALID-COUNT-LATER INVALID-COUNT-LATER: error: {{.*}}: Failed to read counter RUN: not llvm-profdata generate %p/Inputs/bad-hash.profdata.input -o /dev/null 2>&1 | FileCheck %s --check-prefix=BAD-HASH BAD-HASH: error: {{.*}}: Failed to read hash RUN: not llvm-profdata generate %p/Inputs/wrong-count.profdata.input -o /dev/null 2>&1 | FileCheck %s --check-prefix=BAD-FUNCTION-COUNT BAD-FUNCTION-COUNT: error: {{.*}}: Truncated file