diff options
author | Vedant Kumar <vsk@apple.com> | 2017-06-30 00:45:26 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2017-06-30 00:45:26 +0000 |
commit | 16264149cd6dc3699445fda9c03f3628151516b7 (patch) | |
tree | b3553fa37336ad2a85861990866200d89de9c8c9 /unittests/ProfileData | |
parent | f21a6b7f6b38bb7864785dcd590d864c04b1d8d7 (diff) |
[Coverage] Remove two overloads of CoverageMapping::load. NFC.
These overloads are essentially dead, and pose a maintenance cost
without adding any benefit. This is coming up now because I'd like to
experiment with changing the way we store coverage mapping data, and
would rather not have to fix up the old overloads while doing so.
Testing: check-{llvm,profile}, build clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306776 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/ProfileData')
-rw-r--r-- | unittests/ProfileData/CoverageMappingTest.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/unittests/ProfileData/CoverageMappingTest.cpp b/unittests/ProfileData/CoverageMappingTest.cpp index ea51f717a1d..9cd186ac4bc 100644 --- a/unittests/ProfileData/CoverageMappingTest.cpp +++ b/unittests/ProfileData/CoverageMappingTest.cpp @@ -232,15 +232,16 @@ struct CoverageMappingTest : ::testing::TestWithParam<std::pair<bool, bool>> { } Expected<std::unique_ptr<CoverageMapping>> readOutputFunctions() { - if (!UseMultipleReaders) { - CoverageMappingReaderMock CovReader(OutputFunctions); - return CoverageMapping::load(CovReader, *ProfileReader); - } - std::vector<std::unique_ptr<CoverageMappingReader>> CoverageReaders; - for (const auto &OF : OutputFunctions) { - ArrayRef<OutputFunctionCoverageData> Funcs(OF); - CoverageReaders.push_back(make_unique<CoverageMappingReaderMock>(Funcs)); + if (UseMultipleReaders) { + for (const auto &OF : OutputFunctions) { + ArrayRef<OutputFunctionCoverageData> Funcs(OF); + CoverageReaders.push_back( + make_unique<CoverageMappingReaderMock>(Funcs)); + } + } else { + CoverageReaders.push_back( + make_unique<CoverageMappingReaderMock>(OutputFunctions)); } return CoverageMapping::load(CoverageReaders, *ProfileReader); } |