diff options
author | Alan Phipps <a-phipps@ti.com> | 2023-09-20 16:31:49 -0500 |
---|---|---|
committer | Alan Phipps <a-phipps@ti.com> | 2023-09-20 16:32:34 -0500 |
commit | ab3cd075b314995f213b6ca50b6b3b4a14c051bd (patch) | |
tree | 95682c4c1e8a0f41605e5e04b948312b25607872 /llvm/unittests/ProfileData/CoverageMappingTest.cpp | |
parent | 7f3467412ed52d6749b7c53f7934c4374c6d2a00 (diff) | |
download | llvm-ab3cd075b314995f213b6ca50b6b3b4a14c051bd.zip llvm-ab3cd075b314995f213b6ca50b6b3b4a14c051bd.tar.gz llvm-ab3cd075b314995f213b6ca50b6b3b4a14c051bd.tar.bz2 |
Revert "[Coverage][llvm-cov] Enable MC/DC Support in LLVM Source-based Code Coverage (2/3)"
This reverts commit 618a22144db5e45da8c95dc22064103e1b5e5b71.
Buildbots failing on windows and one other issue.
Diffstat (limited to 'llvm/unittests/ProfileData/CoverageMappingTest.cpp')
-rw-r--r-- | llvm/unittests/ProfileData/CoverageMappingTest.cpp | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/llvm/unittests/ProfileData/CoverageMappingTest.cpp b/llvm/unittests/ProfileData/CoverageMappingTest.cpp index 1cf497cb..873bc05 100644 --- a/llvm/unittests/ProfileData/CoverageMappingTest.cpp +++ b/llvm/unittests/ProfileData/CoverageMappingTest.cpp @@ -187,25 +187,6 @@ struct CoverageMappingTest : ::testing::TestWithParam<std::tuple<bool, bool>> { : CounterMappingRegion::makeRegion(C, FileID, LS, CS, LE, CE)); } - void addMCDCDecisionCMR(unsigned Mask, unsigned NC, StringRef File, - unsigned LS, unsigned CS, unsigned LE, unsigned CE) { - auto &Regions = InputFunctions.back().Regions; - unsigned FileID = getFileIndexForFunction(File); - Regions.push_back(CounterMappingRegion::makeDecisionRegion( - CounterMappingRegion::MCDCParameters{Mask, NC}, FileID, LS, CS, LE, - CE)); - } - - void addMCDCBranchCMR(Counter C1, Counter C2, unsigned ID, unsigned TrueID, - unsigned FalseID, StringRef File, unsigned LS, - unsigned CS, unsigned LE, unsigned CE) { - auto &Regions = InputFunctions.back().Regions; - unsigned FileID = getFileIndexForFunction(File); - Regions.push_back(CounterMappingRegion::makeBranchRegion( - C1, C2, CounterMappingRegion::MCDCParameters{0, 0, ID, TrueID, FalseID}, - FileID, LS, CS, LE, CE)); - } - void addExpansionCMR(StringRef File, StringRef ExpandedFile, unsigned LS, unsigned CS, unsigned LE, unsigned CE) { InputFunctions.back().Regions.push_back(CounterMappingRegion::makeExpansion( @@ -847,33 +828,6 @@ TEST_P(CoverageMappingTest, non_code_region_counters) { ASSERT_EQ(1U, Names.size()); } -// Test that MCDC bitmasks not associated with any code regions are allowed. -TEST_P(CoverageMappingTest, non_code_region_bitmask) { - // No records in profdata - - startFunction("func", 0x1234); - addCMR(Counter::getCounter(0), "file", 1, 1, 5, 5); - addCMR(Counter::getCounter(1), "file", 1, 1, 5, 5); - addCMR(Counter::getCounter(2), "file", 1, 1, 5, 5); - addCMR(Counter::getCounter(3), "file", 1, 1, 5, 5); - - addMCDCDecisionCMR(0, 2, "file", 7, 1, 7, 6); - addMCDCBranchCMR(Counter::getCounter(0), Counter::getCounter(1), 1, 2, 0, - "file", 7, 2, 7, 3); - addMCDCBranchCMR(Counter::getCounter(2), Counter::getCounter(3), 2, 0, 0, - "file", 7, 4, 7, 5); - - EXPECT_THAT_ERROR(loadCoverageMapping(), Succeeded()); - - std::vector<std::string> Names; - for (const auto &Func : LoadedCoverage->getCoveredFunctions()) { - Names.push_back(Func.Name); - ASSERT_EQ(2U, Func.CountedBranchRegions.size()); - ASSERT_EQ(1U, Func.MCDCRecords.size()); - } - ASSERT_EQ(1U, Names.size()); -} - TEST_P(CoverageMappingTest, strip_filename_prefix) { ProfileWriter.addRecord({"file1:func", 0x1234, {0}}, Err); |