mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
[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. llvm-svn: 306776
This commit is contained in:
parent
0a3a01b67d
commit
dbd44e728a
@ -450,21 +450,10 @@ public:
|
||||
CoverageMapping &operator=(const CoverageMapping &) = delete;
|
||||
|
||||
/// \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());
|
||||
|
@ -245,18 +245,6 @@ Error CoverageMapping::loadFunctionRecord(
|
||||
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) {
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user