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 {
9999 /// associated with two counters, each representing the number of times the
100100 /// expression evaluates to true or false.
101101 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 ,
102111}
103112
104113/// 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 {
4343 SkippedRegion = 2 ,
4444 GapRegion = 3 ,
4545 BranchRegion = 4 ,
46+ MCDCDecisionRegion = 5 ,
47+ MCDCBranchRegion = 6 ,
4648};
4749
4850static coverage::CounterMappingRegion::RegionKind
@@ -58,6 +60,10 @@ fromRust(LLVMRustCounterMappingRegionKind Kind) {
5860 return coverage::CounterMappingRegion::GapRegion;
5961 case LLVMRustCounterMappingRegionKind::BranchRegion:
6062 return coverage::CounterMappingRegion::BranchRegion;
63+ case LLVMRustCounterMappingRegionKind::MCDCDecisionRegion:
64+ return coverage::CounterMappingRegion::MCDCDecisionRegion;
65+ case LLVMRustCounterMappingRegionKind::MCDCBranchRegion:
66+ return coverage::CounterMappingRegion::MCDCBranchRegion;
6167 }
6268 report_fatal_error (" Bad LLVMRustCounterMappingRegionKind!" );
6369}
You can’t perform that action at this time.
0 commit comments