Home | History | Annotate | Download | only in llvm-profdata
      1 # If we see the same function name, but with different hashes, make
      2 # sure we keep both.
      3 
      4 # 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]
     16 foo
     17 3
     18 3
     19 1
     20 2
     21 3
     22 
     23 # FOO4: Hash: 0x{{0+}}4
     24 # FOO4-NEXT: Counters: 4
     25 # FOO4-NEXT: Function count: 11
     26 # FOO4-NEXT: Block counts: [22, 33, 44]
     27 foo
     28 4
     29 4
     30 11
     31 22
     32 33
     33 44
     34 
     35 # BOTH: Total functions: 2
     36 # BOTH: Maximum function count: 11
     37 # BOTH: Maximum internal block count: 44
     38