clang 19.0.0git
MCDCState.h
Go to the documentation of this file.
1//===---- MCDCState.h - Per-Function MC/DC state ----------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// Per-Function MC/DC state for PGO
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_CLANG_LIB_CODEGEN_MCDCSTATE_H
14#define LLVM_CLANG_LIB_CODEGEN_MCDCSTATE_H
15
16#include "llvm/ADT/DenseMap.h"
17#include "llvm/ADT/SmallVector.h"
18#include "llvm/ProfileData/Coverage/MCDCTypes.h"
19
20namespace clang {
21class Stmt;
22} // namespace clang
23
24namespace clang::CodeGen::MCDC {
25
26using namespace llvm::coverage::mcdc;
27
28/// Per-Function MC/DC state
29struct State {
30 unsigned BitmapBits = 0;
31
32 struct Decision {
33 unsigned BitmapIdx;
35 };
36
37 llvm::DenseMap<const Stmt *, Decision> DecisionByStmt;
38
39 struct Branch {
40 ConditionID ID;
42 };
43
44 llvm::DenseMap<const Stmt *, Branch> BranchByStmt;
45};
46
47} // namespace clang::CodeGen::MCDC
48
49#endif // LLVM_CLANG_LIB_CODEGEN_MCDCSTATE_H
Stmt - This represents one statement.
Definition: Stmt.h:84
The JSON file list parser is used to communicate input to InstallAPI.
llvm::SmallVector< std::array< int, 2 > > Indices
Definition: MCDCState.h:34
Per-Function MC/DC state.
Definition: MCDCState.h:29
llvm::DenseMap< const Stmt *, Branch > BranchByStmt
Definition: MCDCState.h:44
llvm::DenseMap< const Stmt *, Decision > DecisionByStmt
Definition: MCDCState.h:37