aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ProfileData/CoverageMappingTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/ProfileData/CoverageMappingTest.cpp')
-rw-r--r--llvm/unittests/ProfileData/CoverageMappingTest.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/unittests/ProfileData/CoverageMappingTest.cpp b/llvm/unittests/ProfileData/CoverageMappingTest.cpp
index 46f881e..ec81e5f 100644
--- a/llvm/unittests/ProfileData/CoverageMappingTest.cpp
+++ b/llvm/unittests/ProfileData/CoverageMappingTest.cpp
@@ -277,7 +277,9 @@ struct CoverageMappingTest : ::testing::TestWithParam<std::tuple<bool, bool>> {
CoverageReaders.push_back(
std::make_unique<CoverageMappingReaderMock>(Funcs));
}
- return CoverageMapping::load(CoverageReaders, *ProfileReader);
+ auto ProfileReaderRef = std::make_optional(
+ std::reference_wrapper<IndexedInstrProfReader>(*ProfileReader));
+ return CoverageMapping::load(CoverageReaders, ProfileReaderRef);
}
Error loadCoverageMapping(bool EmitFilenames = true) {