brintos

brintos / llvm-project-archived public Read only

0
0
Text · 681 B · d4cae5a Raw
27 lines · c
1// REQUIRES: continuous-mode2 3// RUN: %clang_profgen=%t.profraw -fprofile-continuous -fcoverage-mapping -fcoverage-mcdc -O3 -o %t.exe %s4// RUN: %run %t.exe 3 35// RUN: llvm-profdata show --text --all-functions %t.profraw | FileCheck %s6 7// CHECK: Num Bitmap Bytes:8// CHECK-NEXT: $19// CHECK-NEXT: Bitmap Byte Values:10// CHECK-NEXT: 0x411#include <stdio.h>12#include <stdlib.h>13extern int __llvm_profile_is_continuous_mode_enabled(void);14int main(int argc, char *const argv[]) {15  if (!__llvm_profile_is_continuous_mode_enabled())16    return 1;17 18  if (argc < 3)19    return 1;20 21  if ((atoi(argv[1]) > 2) && (atoi(argv[2]) > 2)) {22    printf("Decision Satisfied");23  }24 25  return 0;26}27