aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
diff options
context:
space:
mode:
authorZequan Wu <zequanwu@google.com>2023-09-18 12:24:58 -0400
committerZequan Wu <zequanwu@google.com>2023-09-18 12:44:26 -0400
commitcb9f66de8b8e333dc51c3dd1af2193af0133d39a (patch)
tree1f6432273c56f53b305ca61a3f4c9c249d5cf661 /llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
parent07228002891c5b970b8f5a0040adf3176b168171 (diff)
downloadllvm-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.cpp5
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)