diff options
author | Douglas Yung <douglas.yung@sony.com> | 2023-01-25 19:11:08 -0800 |
---|---|---|
committer | Douglas Yung <douglas.yung@sony.com> | 2023-01-25 19:11:08 -0800 |
commit | bce910242e7269446683cfcaffd3ebf5281a9125 (patch) | |
tree | 8b117ac672f868e39ea9f7cf643cf70d66f32473 /llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp | |
parent | d4e3a1dcf6494874c1cc4f180c780641593d2ab0 (diff) | |
download | llvm-bce910242e7269446683cfcaffd3ebf5281a9125.zip llvm-bce910242e7269446683cfcaffd3ebf5281a9125.tar.gz llvm-bce910242e7269446683cfcaffd3ebf5281a9125.tar.bz2 |
Revert "[llvm-cov] Look up object files using debuginfod"
This reverts commit efbc8bb18eda63007216ad0cb5a8de04963eddd5.
This change is causing failures when detecting curl on several build bots:
- https://lab.llvm.org/buildbot/#/builders/247/builds/884
- https://lab.llvm.org/buildbot/#/builders/231/builds/7688
- https://lab.llvm.org/buildbot/#/builders/121/builds/27389
- https://lab.llvm.org/buildbot/#/builders/230/builds/8464
- https://lab.llvm.org/buildbot/#/builders/57/builds/24209
- https://lab.llvm.org/buildbot/#/builders/127/builds/42722
Diffstat (limited to 'llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp')
-rw-r--r-- | llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp b/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp index d313864..41962ab 100644 --- a/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp +++ b/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp @@ -954,8 +954,7 @@ static Expected<std::vector<SectionRef>> lookupSections(ObjectFile &OF, static Expected<std::unique_ptr<BinaryCoverageReader>> loadBinaryFormat(std::unique_ptr<Binary> Bin, StringRef Arch, - StringRef CompilationDir = "", - std::optional<object::BuildIDRef> *BinaryID = nullptr) { + StringRef CompilationDir = "") { std::unique_ptr<ObjectFile> OF; if (auto *Universal = dyn_cast<MachOUniversalBinary>(Bin.get())) { // If we have a universal binary, try to look up the object for the @@ -1053,9 +1052,6 @@ loadBinaryFormat(std::unique_ptr<Binary> Bin, StringRef Arch, FuncRecords = std::move(WritableBuffer); } - if (BinaryID) - *BinaryID = getBuildID(OF.get()); - return BinaryCoverageReader::createCoverageReaderFromBuffer( CoverageMapping, std::move(FuncRecords), std::move(ProfileNames), BytesInAddress, Endian, CompilationDir); @@ -1078,7 +1074,7 @@ Expected<std::vector<std::unique_ptr<BinaryCoverageReader>>> BinaryCoverageReader::create( MemoryBufferRef ObjectBuffer, StringRef Arch, SmallVectorImpl<std::unique_ptr<MemoryBuffer>> &ObjectFileBuffers, - StringRef CompilationDir, SmallVectorImpl<object::BuildIDRef> *BinaryIDs) { + StringRef CompilationDir) { std::vector<std::unique_ptr<BinaryCoverageReader>> Readers; if (ObjectBuffer.getBuffer().startswith(TestingFormatMagic)) { @@ -1118,7 +1114,7 @@ BinaryCoverageReader::create( return BinaryCoverageReader::create( ArchiveOrErr.get()->getMemoryBufferRef(), Arch, ObjectFileBuffers, - CompilationDir, BinaryIDs); + CompilationDir); } } @@ -1131,8 +1127,7 @@ BinaryCoverageReader::create( return ChildBufOrErr.takeError(); auto ChildReadersOrErr = BinaryCoverageReader::create( - ChildBufOrErr.get(), Arch, ObjectFileBuffers, CompilationDir, - BinaryIDs); + ChildBufOrErr.get(), Arch, ObjectFileBuffers, CompilationDir); if (!ChildReadersOrErr) return ChildReadersOrErr.takeError(); for (auto &Reader : ChildReadersOrErr.get()) @@ -1151,14 +1146,10 @@ BinaryCoverageReader::create( return std::move(Readers); } - std::optional<object::BuildIDRef> BinaryID; - auto ReaderOrErr = loadBinaryFormat(std::move(Bin), Arch, CompilationDir, - BinaryIDs ? &BinaryID : nullptr); + auto ReaderOrErr = loadBinaryFormat(std::move(Bin), Arch, CompilationDir); if (!ReaderOrErr) return ReaderOrErr.takeError(); Readers.push_back(std::move(ReaderOrErr.get())); - if (BinaryID) - BinaryIDs->push_back(*BinaryID); return std::move(Readers); } |