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/ProfileData/Coverage/MCDCTypes.h"
18 
19 namespace clang {
20 class Stmt;
21 } // namespace clang
22 
23 namespace clang::CodeGen::MCDC {
24 
25 using namespace llvm::coverage::mcdc;
26 
27 /// Per-Function MC/DC state
28 struct State {
29  unsigned BitmapBytes = 0;
30 
31  struct Decision {
32  unsigned BitmapIdx;
33  };
34 
35  llvm::DenseMap<const Stmt *, Decision> DecisionByStmt;
36 
37  struct Branch {
38  ConditionID ID;
39  };
40 
41  llvm::DenseMap<const Stmt *, Branch> BranchByStmt;
42 };
43 
44 } // namespace clang::CodeGen::MCDC
45 
46 #endif // LLVM_CLANG_LIB_CODEGEN_MCDCSTATE_H
The JSON file list parser is used to communicate input to InstallAPI.
Per-Function MC/DC state.
Definition: MCDCState.h:28
llvm::DenseMap< const Stmt *, Branch > BranchByStmt
Definition: MCDCState.h:41
llvm::DenseMap< const Stmt *, Decision > DecisionByStmt
Definition: MCDCState.h:35