diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2024-02-13 22:43:46 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-13 22:43:46 +0900 |
commit | a17a3e9d9a6b4baefd96e19ee5e8ce04cead8ab5 (patch) | |
tree | 2fead6e2ffdf9ed9e02e89dcdaec10f9506debee /llvm/unittests/ProfileData/CoverageMappingTest.cpp | |
parent | a70077ed8cdf7c7c2879c18c1c67917cd88e64ef (diff) | |
download | llvm-a17a3e9d9a6b4baefd96e19ee5e8ce04cead8ab5.zip llvm-a17a3e9d9a6b4baefd96e19ee5e8ce04cead8ab5.tar.gz llvm-a17a3e9d9a6b4baefd96e19ee5e8ce04cead8ab5.tar.bz2 |
[MC/DC] Refactor: Make `MCDCParams` as `std::variant` (#81227)
Introduce `mcdc::DecisionParameters` and `mcdc::BranchParameters` and make
sure them not initialized as zero.
FIXME: Could we make `CoverageMappingRegion` as a smart tagged union?
Diffstat (limited to 'llvm/unittests/ProfileData/CoverageMappingTest.cpp')
-rw-r--r-- | llvm/unittests/ProfileData/CoverageMappingTest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/unittests/ProfileData/CoverageMappingTest.cpp b/llvm/unittests/ProfileData/CoverageMappingTest.cpp index d60312b..6f6718f 100644 --- a/llvm/unittests/ProfileData/CoverageMappingTest.cpp +++ b/llvm/unittests/ProfileData/CoverageMappingTest.cpp @@ -197,7 +197,7 @@ struct CoverageMappingTest : ::testing::TestWithParam<std::tuple<bool, bool>> { auto &Regions = InputFunctions.back().Regions; unsigned FileID = getFileIndexForFunction(File); Regions.push_back(CounterMappingRegion::makeDecisionRegion( - mcdc::Parameters{Mask, NC}, FileID, LS, CS, LE, CE)); + mcdc::DecisionParameters{Mask, NC}, FileID, LS, CS, LE, CE)); } void addMCDCBranchCMR(Counter C1, Counter C2, unsigned ID, unsigned TrueID, @@ -206,8 +206,8 @@ struct CoverageMappingTest : ::testing::TestWithParam<std::tuple<bool, bool>> { auto &Regions = InputFunctions.back().Regions; unsigned FileID = getFileIndexForFunction(File); Regions.push_back(CounterMappingRegion::makeBranchRegion( - C1, C2, mcdc::Parameters{0, 0, ID, TrueID, FalseID}, FileID, LS, CS, LE, - CE)); + C1, C2, FileID, LS, CS, LE, CE, + mcdc::BranchParameters{ID, TrueID, FalseID})); } void addExpansionCMR(StringRef File, StringRef ExpandedFile, unsigned LS, |