1 | // REQUIRES: darwin |
2 | |
3 | // RUN: %clang_profgen -fcoverage-mapping -fcoverage-mcdc -O3 -o %t.exe %s |
4 | // RUN: env LLVM_PROFILE_FILE="%c%t.profraw" %run %t.exe 3 3 |
5 | // RUN: llvm-profdata show --text --all-functions %t.profraw | FileCheck %s |
6 | |
7 | // CHECK: Num Bitmap Bytes: |
8 | // CHECK-NEXT: $1 |
9 | // CHECK-NEXT: Bitmap Byte Values: |
10 | // CHECK-NEXT: 8 |
11 | #include <stdio.h> |
12 | #include <stdlib.h> |
13 | extern int __llvm_profile_is_continuous_mode_enabled(void); |
14 | int 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(nptr: argv[1]) > 2) && (atoi(nptr: argv[2]) > 2)) { |
22 | printf(format: "Decision Satisfied" ); |
23 | } |
24 | |
25 | return 0; |
26 | } |
27 | |