brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 209ceec Raw
39 lines · c
1// REQUIRES: continuous-mode2 3// RUN: %clang_profgen=%t.profraw -fprofile-continuous -fcoverage-mapping -o %t.exe %s4// RUN: echo "garbage" > %t.profraw5// RUN: %run %t.exe6// RUN: llvm-profdata show --counts --all-functions %t.profraw | FileCheck %s -check-prefix=CHECK-COUNTS7// RUN: llvm-profdata merge -o %t.profdata %t.profraw8//9// COM: The "report" and "show" commands of llvm-cov are not supported on AIX.10// RUN: %if !target={{.*aix.*}} %{ \11// RUN:   llvm-cov report %t.exe -instr-profile %t.profdata | FileCheck %s -check-prefix=CHECK-COVERAGE \12// RUN: %}13 14// CHECK-COUNTS: Counters:15// CHECK-COUNTS-NEXT:   main:16// CHECK-COUNTS-NEXT:     Hash: 0x{{.*}}17// CHECK-COUNTS-NEXT:     Counters: 218// CHECK-COUNTS-NEXT:     Function count: 119// CHECK-COUNTS-NEXT:     Block counts: [1]20// CHECK-COUNTS-NEXT: Instrumentation level: Front-end21// CHECK-COUNTS-NEXT: Functions shown: 122// CHECK-COUNTS-NEXT: Total functions: 123// CHECK-COUNTS-NEXT: Maximum function count: 124// CHECK-COUNTS-NEXT: Maximum internal block count: 125 26// CHECK-COVERAGE: Filename    Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover27// CHECK-COVERAGE-NEXT: ---28// CHECK-COVERAGE-NEXT: basic.c      4                 1    75.00%           1                 0   100.00%           5                 1    80.00%29// CHECK-COVERAGE-NEXT: ---30// CHECK-COVERAGE-NEXT: TOTAL        4                 1    75.00%           1                 0   100.00%           5                 1    80.00%31 32extern int __llvm_profile_is_continuous_mode_enabled(void);33 34int main() {35  if (__llvm_profile_is_continuous_mode_enabled())36    return 0;37  return 1;38}39