[llvm] 1609a87 - [Profile] Pass InstrProfSymtab by reference.
Zequan Wu via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 18 11:20:22 PDT 2023
Author: Zequan Wu
Date: 2023-09-18T14:20:10-04:00
New Revision: 1609a87a830da8a6d37aafc65f9ec9f8e9199776
URL: https://github.com/llvm/llvm-project/commit/1609a87a830da8a6d37aafc65f9ec9f8e9199776
DIFF: https://github.com/llvm/llvm-project/commit/1609a87a830da8a6d37aafc65f9ec9f8e9199776.diff
LOG: [Profile] Pass InstrProfSymtab by reference.
Added:
Modified:
llvm/include/llvm/ProfileData/Coverage/CoverageMappingReader.h
llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/ProfileData/Coverage/CoverageMappingReader.h b/llvm/include/llvm/ProfileData/Coverage/CoverageMappingReader.h
index 051276557892cc7..41935ae6bb39881 100644
--- a/llvm/include/llvm/ProfileData/Coverage/CoverageMappingReader.h
+++ b/llvm/include/llvm/ProfileData/Coverage/CoverageMappingReader.h
@@ -206,7 +206,7 @@ class BinaryCoverageReader : public CoverageMappingReader {
create(MemoryBufferRef ObjectBuffer,
StringRef Arch,
SmallVectorImpl<std::unique_ptr<MemoryBuffer>> &ObjectFileBuffers,
- InstrProfSymtab IndexedProfSymTab,
+ InstrProfSymtab& IndexedProfSymTab,
StringRef CompilationDir = "",
SmallVectorImpl<object::BuildIDRef> *BinaryIDs = nullptr);
diff --git a/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp b/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
index 6fa2247682ad5f5..a99785ee0df5427 100644
--- a/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
+++ b/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
@@ -358,7 +358,7 @@ Error CoverageMapping::loadFromFile(
MemoryBufferRef CovMappingBufRef =
CovMappingBufOrErr.get()->getMemBufferRef();
SmallVector<std::unique_ptr<MemoryBuffer>, 4> Buffers;
- InstrProfSymtab& ProfSymTab = ProfileReader.getSymtab();
+ InstrProfSymtab &ProfSymTab = ProfileReader.getSymtab();
SmallVector<object::BuildIDRef> BinaryIDs;
auto CoverageReadersOrErr = BinaryCoverageReader::create(
diff --git a/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp b/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
index f68c234d5da8b47..b17caaf99807357 100644
--- a/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
+++ b/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
@@ -1038,7 +1038,7 @@ static Error getProfileNamesFromDebugInfo(StringRef FileName,
static Expected<std::unique_ptr<BinaryCoverageReader>>
loadBinaryFormat(std::unique_ptr<Binary> Bin, StringRef Arch,
- InstrProfSymtab ProfSymTab, StringRef CompilationDir = "",
+ InstrProfSymtab &ProfSymTab, StringRef CompilationDir = "",
object::BuildIDRef *BinaryID = nullptr) {
std::unique_ptr<ObjectFile> OF;
if (auto *Universal = dyn_cast<MachOUniversalBinary>(Bin.get())) {
@@ -1176,7 +1176,7 @@ Expected<std::vector<std::unique_ptr<BinaryCoverageReader>>>
BinaryCoverageReader::create(
MemoryBufferRef ObjectBuffer, StringRef Arch,
SmallVectorImpl<std::unique_ptr<MemoryBuffer>> &ObjectFileBuffers,
- InstrProfSymtab ProfSymTab, StringRef CompilationDir,
+ InstrProfSymtab &ProfSymTab, StringRef CompilationDir,
SmallVectorImpl<object::BuildIDRef> *BinaryIDs) {
std::vector<std::unique_ptr<BinaryCoverageReader>> Readers;
More information about the llvm-commits
mailing list