brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 01b25d2 Raw
35 lines · c
1// REQUIRES: target={{.*(linux|solaris|windows-msvc|aix).*}}2 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// RUN: %if !target={{.*aix.*}} %{ llvm-cov report %t.exe -instr-profile %t.profdata | FileCheck %s -check-prefix=CHECK-COVERAGE %}9 10// CHECK-COUNTS: Counters:11// CHECK-COUNTS-NEXT:   main:12// CHECK-COUNTS-NEXT:     Hash: 0x{{.*}}13// CHECK-COUNTS-NEXT:     Counters: 214// CHECK-COUNTS-NEXT:     Function count: 115// CHECK-COUNTS-NEXT:     Block counts: [1]16// CHECK-COUNTS-NEXT: Instrumentation level: Front-end17// CHECK-COUNTS-NEXT: Functions shown: 118// CHECK-COUNTS-NEXT: Total functions: 119// CHECK-COUNTS-NEXT: Maximum function count: 120// CHECK-COUNTS-NEXT: Maximum internal block count: 121 22// CHECK-COVERAGE: Filename                         Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover23// CHECK-COVERAGE-NEXT: ---24// CHECK-COVERAGE-NEXT: runtime-counter-relocation.c      4                 1    75.00%           1                 0   100.00%           5                 1    80.00%25// CHECK-COVERAGE-NEXT: ---26// CHECK-COVERAGE-NEXT: TOTAL                             4                 1    75.00%           1                 0   100.00%           5                 1    80.00%27 28extern int __llvm_profile_is_continuous_mode_enabled(void);29 30int main() {31  if (__llvm_profile_is_continuous_mode_enabled())32    return 0;33  return 1;34}35