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
/// \brief Load the coverage mapping using the given readers.
static Expected<std::unique_ptr<CoverageMapping>>
- load(CoverageMappingReader &CoverageReader,
- IndexedInstrProfReader &ProfileReader);
-
- static Expected<std::unique_ptr<CoverageMapping>>
load(ArrayRef<std::unique_ptr<CoverageMappingReader>> CoverageReaders,
IndexedInstrProfReader &ProfileReader);
- /// \brief Load the coverage mapping from the given files.
- static Expected<std::unique_ptr<CoverageMapping>>
- load(StringRef ObjectFilename, StringRef ProfileFilename,
- StringRef Arch = StringRef()) {
- return load(ArrayRef<StringRef>(ObjectFilename), ProfileFilename, Arch);
- }
-
static Expected<std::unique_ptr<CoverageMapping>>
load(ArrayRef<StringRef> ObjectFilenames, StringRef ProfileFilename,
StringRef Arch = StringRef());
return Error::success();
}
-Expected<std::unique_ptr<CoverageMapping>>
-CoverageMapping::load(CoverageMappingReader &CoverageReader,
- IndexedInstrProfReader &ProfileReader) {
- auto Coverage = std::unique_ptr<CoverageMapping>(new CoverageMapping());
-
- for (const auto &Record : CoverageReader)
- if (Error E = Coverage->loadFunctionRecord(Record, ProfileReader))
- return std::move(E);
-
- return std::move(Coverage);
-}
-
Expected<std::unique_ptr<CoverageMapping>> CoverageMapping::load(
ArrayRef<std::unique_ptr<CoverageMappingReader>> CoverageReaders,
IndexedInstrProfReader &ProfileReader) {
}
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);
}