llvm.org GIT mirror llvm / 1626414
[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 Vedant Kumar 2 years ago
3 changed file(s) with 9 addition(s) and 31 deletion(s). Raw diff Collapse all Expand all
450450
451451 /// \brief Load the coverage mapping using the given readers.
452452 static Expected>
453 load(CoverageMappingReader &CoverageReader,
454 IndexedInstrProfReader &ProfileReader);
455
456 static Expected>
457453 load(ArrayRef> CoverageReaders,
458454 IndexedInstrProfReader &ProfileReader);
459
460 /// \brief Load the coverage mapping from the given files.
461 static Expected>
462 load(StringRef ObjectFilename, StringRef ProfileFilename,
463 StringRef Arch = StringRef()) {
464 return load(ArrayRef(ObjectFilename), ProfileFilename, Arch);
465 }
466455
467456 static Expected>
468457 load(ArrayRef ObjectFilenames, StringRef ProfileFilename,
242242
243243 Functions.push_back(std::move(Function));
244244 return Error::success();
245 }
246
247 Expected>
248 CoverageMapping::load(CoverageMappingReader &CoverageReader,
249 IndexedInstrProfReader &ProfileReader) {
250 auto Coverage = std::unique_ptr(new CoverageMapping());
251
252 for (const auto &Record : CoverageReader)
253 if (Error E = Coverage->loadFunctionRecord(Record, ProfileReader))
254 return std::move(E);
255
256 return std::move(Coverage);
257245 }
258246
259247 Expected> CoverageMapping::load(
231231 }
232232
233233 Expected> readOutputFunctions() {
234 if (!UseMultipleReaders) {
235 CoverageMappingReaderMock CovReader(OutputFunctions);
236 return CoverageMapping::load(CovReader, *ProfileReader);
237 }
238
239234 std::vector> CoverageReaders;
240 for (const auto &OF : OutputFunctions) {
241 ArrayRef Funcs(OF);
242 CoverageReaders.push_back(make_unique(Funcs));
235 if (UseMultipleReaders) {
236 for (const auto &OF : OutputFunctions) {
237 ArrayRef Funcs(OF);
238 CoverageReaders.push_back(
239 make_unique(Funcs));
240 }
241 } else {
242 CoverageReaders.push_back(
243 make_unique(OutputFunctions));
243244 }
244245 return CoverageMapping::load(CoverageReaders, *ProfileReader);
245246 }