diff options
author | Zequan Wu <zequanwu@google.com> | 2023-09-18 12:24:58 -0400 |
---|---|---|
committer | Zequan Wu <zequanwu@google.com> | 2023-09-18 12:44:26 -0400 |
commit | cb9f66de8b8e333dc51c3dd1af2193af0133d39a (patch) | |
tree | 1f6432273c56f53b305ca61a3f4c9c249d5cf661 /llvm/lib/ProfileData/Coverage/CoverageMapping.cpp | |
parent | 07228002891c5b970b8f5a0040adf3176b168171 (diff) | |
download | llvm-cb9f66de8b8e333dc51c3dd1af2193af0133d39a.zip llvm-cb9f66de8b8e333dc51c3dd1af2193af0133d39a.tar.gz llvm-cb9f66de8b8e333dc51c3dd1af2193af0133d39a.tar.bz2 |
[Profile] Pass InstrProfSymtab instead of IndexedInstrProfReader when creating BinaryCoverageReader
Only InstrProfSymtab is needed to retrieve function names when debug info corrletaion is enabled.
Diffstat (limited to 'llvm/lib/ProfileData/Coverage/CoverageMapping.cpp')
-rw-r--r-- | llvm/lib/ProfileData/Coverage/CoverageMapping.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp b/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp index f879c73..6fa2247 100644 --- a/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp +++ b/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp @@ -358,11 +358,12 @@ Error CoverageMapping::loadFromFile( MemoryBufferRef CovMappingBufRef = CovMappingBufOrErr.get()->getMemBufferRef(); SmallVector<std::unique_ptr<MemoryBuffer>, 4> Buffers; + InstrProfSymtab& ProfSymTab = ProfileReader.getSymtab(); SmallVector<object::BuildIDRef> BinaryIDs; auto CoverageReadersOrErr = BinaryCoverageReader::create( - CovMappingBufRef, ProfileReader, Arch, Buffers, CompilationDir, - FoundBinaryIDs ? &BinaryIDs : nullptr); + CovMappingBufRef, Arch, Buffers, ProfSymTab, + CompilationDir, FoundBinaryIDs ? &BinaryIDs : nullptr); if (Error E = CoverageReadersOrErr.takeError()) { E = handleMaybeNoDataFoundError(std::move(E)); if (E) |