File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
rustc_codegen_llvm/src/coverageinfo Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,15 @@ pub enum RegionKind {
99
99
/// associated with two counters, each representing the number of times the
100
100
/// expression evaluates to true or false.
101
101
BranchRegion = 4 ,
102
+
103
+ /// A DecisionRegion represents a top-level boolean expression and is
104
+ /// associated with a variable length bitmap index and condition number.
105
+ #[ allow( dead_code) ]
106
+ MCDCDecisionRegion = 5 ,
107
+
108
+ /// A Branch Region can be extended to include IDs to facilitate MC/DC.
109
+ #[ allow( dead_code) ]
110
+ MCDCBranchRegion = 6 ,
102
111
}
103
112
104
113
/// This struct provides LLVM's representation of a "CoverageMappingRegion", encoded into the
Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ enum class LLVMRustCounterMappingRegionKind {
43
43
SkippedRegion = 2 ,
44
44
GapRegion = 3 ,
45
45
BranchRegion = 4 ,
46
+ MCDCDecisionRegion = 5 ,
47
+ MCDCBranchRegion = 6 ,
46
48
};
47
49
48
50
static coverage::CounterMappingRegion::RegionKind
@@ -58,6 +60,10 @@ fromRust(LLVMRustCounterMappingRegionKind Kind) {
58
60
return coverage::CounterMappingRegion::GapRegion;
59
61
case LLVMRustCounterMappingRegionKind::BranchRegion:
60
62
return coverage::CounterMappingRegion::BranchRegion;
63
+ case LLVMRustCounterMappingRegionKind::MCDCDecisionRegion:
64
+ return coverage::CounterMappingRegion::MCDCDecisionRegion;
65
+ case LLVMRustCounterMappingRegionKind::MCDCBranchRegion:
66
+ return coverage::CounterMappingRegion::MCDCBranchRegion;
61
67
}
62
68
report_fatal_error (" Bad LLVMRustCounterMappingRegionKind!" );
63
69
}
You can’t perform that action at this time.
0 commit comments