Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
coverage_info.hpp File Reference

Go to the source code of this file.

Macro Definition Documentation

◆ ARENE_IS_COVERAGE_COMPILATION

#define ARENE_IS_COVERAGE_COMPILATION

A platform support query for testing if the current compilation is happening under a coverage tool such as gcov or LLVMCov.

Usage:

#if ARENE_IS_ON(ARENE_IS_COVERAGE_COMPILATION)

The value of this query is determined as follows, in order of precedence:

  1. If ARENE_IS_COVERAGE_COMPILATION has been explicitly defined via a -D flag to the compiler or similar:
    • ARENE_ON if it is truthy
    • ARENE_OFF if it is not truthy
  1. If either ARENE_IS_ON(ARENE_IS_GCOV) or ARENE_IS_ON(ARENE_IS_LLVMCOV) returns true it is ARENE_ON_BY_DEFAULT

◆ ARENE_IS_COVERAGE_COMPILATION_I_

#define ARENE_IS_COVERAGE_COMPILATION_I_   ARENE_OFF_BY_DEFAULT

◆ ARENE_IS_GCOV

#define ARENE_IS_GCOV

A platform support query for testing if the current compilation is happening under gcov.

Usage:

#if ARENE_IS_ON(ARENE_IS_GCOV)

The value of this query is determined as follows, in order of precedence:

  1. If ARENE_IS_GCOV has been explicitly defined via a -D flag to the compiler or similar:
    • ARENE_ON if it is truthy
    • ARENE_OFF if it is not truthy
  1. If __GCOV__ is defined it is ARENE_ON_BY_DEFAULT
  1. Otherwise, it is ARENE_OFF_BY_DEFAULT

◆ ARENE_IS_GCOV_I_

#define ARENE_IS_GCOV_I_   ARENE_OFF_BY_DEFAULT

◆ ARENE_IS_LLVMCOV

#define ARENE_IS_LLVMCOV

A platform support query for testing if the current compilation is happening under LLVMCov.

Usage:

#if ARENE_IS_ON(ARENE_IS_LLVMCOV)

The value of this query is determined as follows, in order of precedence:

  1. If ARENE_IS_LLVMCOV has been explicitly defined via a -D flag to the compiler or similar:
    • ARENE_ON if it is truthy
    • ARENE_OFF if it is not truthy
  1. If __LLVM_INSTR_PROFILE_GENERATE is defined it is ARENE_ON_BY_DEFAULT

◆ ARENE_IS_LLVMCOV_I_

#define ARENE_IS_LLVMCOV_I_   ARENE_OFF_BY_DEFAULT