brintos

brintos / llvm-project-archived public Read only

0
0
Text · 459 B · 0e3981c Raw
31 lines · c
1// RUN: %clang_pgogen  -O2 -o %t %s2// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t3// RUN: llvm-profdata show -function main -counts  %t.profraw| FileCheck  %s 4 5void exit(int);6int g;7__attribute__((noinline)) void foo()8{9  g++;10  if (g==1000)11    exit(0);12}13 14 15int main()16{17  while (1) {18    foo();19  }20 21}22 23// CHECK: Counters:24// CHECK-NEXT:  main:25// CHECK-NEXT:    Hash: {{.*}}26// CHECK-NEXT:    Counters: 227// CHECK-NEXT:    Block counts: [1000, 1]28 29 30 31