Skip to content

Commit 32db121

Browse files
committed
[Coverage] Allow Clang coverage to be used with debug info correlation.
Debug info correlation is an option in InstrProfiling pass, which is used by both IR instrumentation and front-end instrumentation. So, Clang coverage can also benefits the binary size saving from it. Reviewed By: ellis Differential Revision: https://reviews.llvm.org/D157913
1 parent 79e96b2 commit 32db121

File tree

12 files changed

+409
-22
lines changed

12 files changed

+409
-22
lines changed

clang/lib/CodeGen/CoverageMappingGen.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
// is textually included.
3232
#define COVMAP_V3
3333

34+
namespace llvm {
35+
extern cl::opt<bool> DebugInfoCorrelate;
36+
} // namespace llvm
37+
3438
static llvm::cl::opt<bool> EmptyLineCommentCoverage(
3539
"emptyline-comment-coverage",
3640
llvm::cl::desc("Emit emptylines and comment lines as skipped regions (only "
@@ -1821,6 +1825,22 @@ void CoverageMappingModuleGen::emit() {
18211825
llvm::GlobalValue::InternalLinkage, NamesArrVal,
18221826
llvm::getCoverageUnusedNamesVarName());
18231827
}
1828+
const StringRef VarName(INSTR_PROF_QUOTE(INSTR_PROF_RAW_VERSION_VAR));
1829+
llvm::Type *IntTy64 = llvm::Type::getInt64Ty(Ctx);
1830+
uint64_t ProfileVersion = INSTR_PROF_RAW_VERSION;
1831+
if (llvm::DebugInfoCorrelate)
1832+
ProfileVersion |= VARIANT_MASK_DBG_CORRELATE;
1833+
auto *VersionVariable = new llvm::GlobalVariable(
1834+
CGM.getModule(), llvm::Type::getInt64Ty(Ctx), true,
1835+
llvm::GlobalValue::WeakAnyLinkage,
1836+
llvm::Constant::getIntegerValue(IntTy64, llvm::APInt(64, ProfileVersion)),
1837+
VarName);
1838+
VersionVariable->setVisibility(llvm::GlobalValue::HiddenVisibility);
1839+
llvm::Triple TT(CGM.getModule().getTargetTriple());
1840+
if (TT.supportsCOMDAT()) {
1841+
VersionVariable->setLinkage(llvm::GlobalValue::ExternalLinkage);
1842+
VersionVariable->setComdat(CGM.getModule().getOrInsertComdat(VarName));
1843+
}
18241844
}
18251845

18261846
unsigned CoverageMappingModuleGen::getFileID(FileEntryRef File) {
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// RUN: %clang_cc1 -debug-info-kind=standalone -fprofile-instrument=clang -fcoverage-mapping -emit-llvm -o - %s | FileCheck %s
2+
// RUN: %clang_cc1 -debug-info-kind=standalone -mllvm -debug-info-correlate -fprofile-instrument=clang -fcoverage-mapping -emit-llvm -o - %s | FileCheck %s --check-prefix=DEBUG_INFO
3+
4+
// CHECK: @__llvm_profile_raw_version = hidden constant i64 8, comdat
5+
// DEBUG_INFO: @__llvm_profile_raw_version = hidden constant i64 576460752303423496, comdat
6+
7+
int main() {
8+
return 0;
9+
}
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
// Test debug info correlate with clang coverage.
2+
3+
// Test the case when there is no __llvm_prf_names in the binary.
4+
// RUN: %clang_profgen -o %t.normal -fcoverage-mapping %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp
5+
// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t.normal
6+
// RUN: llvm-profdata merge -o %t.normal.profdata %t.profraw
7+
8+
// RUN: %clang_profgen -o %t -g -mllvm --debug-info-correlate -fcoverage-mapping %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp
9+
// RUN: env LLVM_PROFILE_FILE=%t.proflite %run %t
10+
// RUN: llvm-profdata merge -o %t.profdata --debug-info=%t.dSYM %t.proflite
11+
12+
// RUN: diff <(llvm-profdata show --all-functions --counts %t.normal.profdata) <(llvm-profdata show --all-functions --counts %t.profdata)
13+
14+
// RUN: llvm-cov report --instr-profile=%t.profdata %t | FileCheck %s -check-prefix=NONAME
15+
16+
// Test debug info correlate with clang coverage (online merging).
17+
18+
// RUN: env LLVM_PROFILE_FILE=%t-1.profraw %run %t.normal
19+
// RUN: env LLVM_PROFILE_FILE=%t-2.profraw %run %t.normal
20+
// RUN: llvm-profdata merge -o %t.normal.profdata %t-1.profraw %t-2.profraw
21+
22+
// RUN: rm -rf %t.profdir && mkdir %t.profdir
23+
// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.proflite %run %t
24+
// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.proflite %run %t
25+
// RUN: llvm-profdata merge -o %t.profdata --debug-info=%t.dSYM %t.profdir
26+
27+
// RUN: diff <(llvm-profdata show --all-functions --counts %t.normal.profdata) <(llvm-profdata show --all-functions --counts %t.profdata)
28+
29+
// RUN: llvm-cov report --instr-profile=%t.profdata %t | FileCheck %s -check-prefix=NONAME
30+
// RUN: llvm-cov report --instr-profile=%t.normal.profdata %t | FileCheck %s -check-prefix=NONAME
31+
32+
// NONAME: Filename Regions Missed Regions Cover Functions Missed Functions Executed Lines Missed Lines Cover Branches Missed Branches Cover
33+
// NONAME-NEXT: --
34+
// NONAME-NEXT: instrprof-debug-info-correlate-bar.h 3 1 66.67% 1 0 100.00% 5 1 80.00% 2 1 50.00%
35+
// NONAME-NEXT: instrprof-debug-info-correlate-foo.cpp 5 2 60.00% 2 1 50.00% 6 2 66.67% 2 1 50.00%
36+
// NONAME-NEXT: instrprof-debug-info-correlate-main.cpp 4 0 100.00% 1 0 100.00% 5 0 100.00% 2 0 100.00%
37+
// NONAME-NEXT: --
38+
// NONAME-NEXT: TOTAL 12 3 75.00% 4 1 75.00% 16 3 81.25% 6 2 66.67%
39+
40+
// Test the case when there is __llvm_prf_names in the binary (those are names of uninstrumented functions).
41+
// RUN: %clang_profgen -o %t.normal -fcoverage-mapping -mllvm -enable-name-compression=false %s
42+
// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t.normal
43+
// RUN: llvm-profdata merge -o %t.normal.profdata %t.profraw
44+
45+
// RUN: %clang_profgen -o %t -g -mllvm --debug-info-correlate -fcoverage-mapping -mllvm -enable-name-compression=false %s
46+
// RUN: env LLVM_PROFILE_FILE=%t.proflite %run %t
47+
// RUN: llvm-profdata merge -o %t.profdata --debug-info=%t.dSYM %t.proflite
48+
49+
// RUN: diff <(llvm-profdata show --all-functions --counts %t.normal.profdata) <(llvm-profdata show --all-functions --counts %t.profdata)
50+
51+
// RUN: llvm-cov export --format=lcov --instr-profile=%t.profdata %t | FileCheck %s -check-prefix=NAME
52+
53+
// Test debug info correlate with clang coverage (online merging).
54+
55+
// RUN: env LLVM_PROFILE_FILE=%t-1.profraw %run %t.normal
56+
// RUN: env LLVM_PROFILE_FILE=%t-2.profraw %run %t.normal
57+
// RUN: llvm-profdata merge -o %t.normal.profdata %t-1.profraw %t-2.profraw
58+
59+
// RUN: rm -rf %t.profdir && mkdir %t.profdir
60+
// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.proflite %run %t
61+
// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.proflite %run %t
62+
// RUN: llvm-profdata merge -o %t.profdata --debug-info=%t.dSYM %t.profdir
63+
64+
// RUN: diff <(llvm-profdata show --all-functions --counts %t.normal.profdata) <(llvm-profdata show --all-functions --counts %t.profdata)
65+
66+
// RUN: llvm-cov export --format=lcov --instr-profile=%t.profdata %t | FileCheck %s -check-prefix=NAME
67+
// NAME: _Z9used_funcv
68+
// NAME: main
69+
// NAME: _ZN1A11unused_funcEv
70+
71+
struct A {
72+
void unused_func() {}
73+
};
74+
void used_func() {}
75+
int main() {
76+
used_func();
77+
return 0;
78+
}
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
// Test debug info correlate with clang coverage.
2+
3+
// Test the case when there is no __llvm_prf_names in the binary.
4+
// RUN: %clang_profgen -o %t.normal -fcoverage-mapping %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp
5+
// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t.normal
6+
// RUN: llvm-profdata merge -o %t.normal.profdata %t.profraw
7+
8+
// RUN: %clang_profgen -o %t -g -mllvm --debug-info-correlate -fcoverage-mapping %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instrprof-debug-info-correlate-foo.cpp
9+
// RUN: env LLVM_PROFILE_FILE=%t.proflite %run %t
10+
// RUN: llvm-profdata merge -o %t.profdata --debug-info=%t %t.proflite
11+
12+
// RUN: diff <(llvm-profdata show --all-functions --counts %t.normal.profdata) <(llvm-profdata show --all-functions --counts %t.profdata)
13+
14+
// RUN: llvm-cov report --instr-profile=%t.profdata %t | FileCheck %s -check-prefix=NONAME
15+
16+
// Test debug info correlate with clang coverage (online merging).
17+
18+
// RUN: env LLVM_PROFILE_FILE=%t-1.profraw %run %t.normal
19+
// RUN: env LLVM_PROFILE_FILE=%t-2.profraw %run %t.normal
20+
// RUN: llvm-profdata merge -o %t.normal.profdata %t-1.profraw %t-2.profraw
21+
22+
// RUN: rm -rf %t.profdir && mkdir %t.profdir
23+
// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.proflite %run %t
24+
// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.proflite %run %t
25+
// RUN: llvm-profdata merge -o %t.profdata --debug-info=%t %t.profdir
26+
27+
// RUN: diff <(llvm-profdata show --all-functions --counts %t.normal.profdata) <(llvm-profdata show --all-functions --counts %t.profdata)
28+
29+
// RUN: llvm-cov report --instr-profile=%t.profdata %t | FileCheck %s -check-prefix=NONAME
30+
// RUN: llvm-cov report --instr-profile=%t.normal.profdata %t | FileCheck %s -check-prefix=NONAME
31+
32+
// NONAME: Filename Regions Missed Regions Cover Functions Missed Functions Executed Lines Missed Lines Cover Branches Missed Branches Cover
33+
// NONAME-NEXT: --
34+
// NONAME-NEXT: instrprof-debug-info-correlate-bar.h 3 1 66.67% 1 0 100.00% 5 1 80.00% 2 1 50.00%
35+
// NONAME-NEXT: instrprof-debug-info-correlate-foo.cpp 5 2 60.00% 2 1 50.00% 6 2 66.67% 2 1 50.00%
36+
// NONAME-NEXT: instrprof-debug-info-correlate-main.cpp 4 0 100.00% 1 0 100.00% 5 0 100.00% 2 0 100.00%
37+
// NONAME-NEXT: --
38+
// NONAME-NEXT: TOTAL 12 3 75.00% 4 1 75.00% 16 3 81.25% 6 2 66.67%
39+
40+
// Test the case when there is __llvm_prf_names in the binary (those are names of uninstrumented functions).
41+
// RUN: %clang_profgen -o %t.normal -fcoverage-mapping -mllvm -enable-name-compression=false %s
42+
// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t.normal
43+
// RUN: llvm-profdata merge -o %t.normal.profdata %t.profraw
44+
45+
// RUN: %clang_profgen -o %t -g -mllvm --debug-info-correlate -fcoverage-mapping -mllvm -enable-name-compression=false %s
46+
// RUN: env LLVM_PROFILE_FILE=%t.proflite %run %t
47+
// RUN: llvm-profdata merge -o %t.profdata --debug-info=%t %t.proflite
48+
49+
// RUN: diff <(llvm-profdata show --all-functions --counts %t.normal.profdata) <(llvm-profdata show --all-functions --counts %t.profdata)
50+
51+
// RUN: llvm-cov export --format=lcov --instr-profile=%t.profdata %t | FileCheck %s -check-prefix=NAME
52+
53+
// Test debug info correlate with clang coverage (online merging).
54+
55+
// RUN: env LLVM_PROFILE_FILE=%t-1.profraw %run %t.normal
56+
// RUN: env LLVM_PROFILE_FILE=%t-2.profraw %run %t.normal
57+
// RUN: llvm-profdata merge -o %t.normal.profdata %t-1.profraw %t-2.profraw
58+
59+
// RUN: rm -rf %t.profdir && mkdir %t.profdir
60+
// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.proflite %run %t
61+
// RUN: env LLVM_PROFILE_FILE=%t.profdir/%m.proflite %run %t
62+
// RUN: llvm-profdata merge -o %t.profdata --debug-info=%t %t.profdir
63+
64+
// RUN: diff <(llvm-profdata show --all-functions --counts %t.normal.profdata) <(llvm-profdata show --all-functions --counts %t.profdata)
65+
66+
// RUN: llvm-cov export --format=lcov --instr-profile=%t.profdata %t | FileCheck %s -check-prefix=NAME
67+
// NAME: _Z9used_funcv
68+
// NAME: main
69+
// NAME: _ZN1A11unused_funcEv
70+
71+
struct A {
72+
void unused_func() {}
73+
};
74+
void used_func() {}
75+
int main() {
76+
used_func();
77+
return 0;
78+
}

llvm/include/llvm/ProfileData/Coverage/CoverageMappingReader.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@ class BinaryCoverageReader : public CoverageMappingReader {
203203
BinaryCoverageReader &operator=(const BinaryCoverageReader &) = delete;
204204

205205
static Expected<std::vector<std::unique_ptr<BinaryCoverageReader>>>
206-
create(MemoryBufferRef ObjectBuffer, StringRef Arch,
206+
create(MemoryBufferRef ObjectBuffer, IndexedInstrProfReader &ProfileReader,
207+
StringRef Arch,
207208
SmallVectorImpl<std::unique_ptr<MemoryBuffer>> &ObjectFileBuffers,
208209
StringRef CompilationDir = "",
209210
SmallVectorImpl<object::BuildIDRef> *BinaryIDs = nullptr);

llvm/include/llvm/ProfileData/InstrProfCorrelator.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ class InstrProfCorrelator {
3939
/// \param MaxWarnings the maximum number of warnings to emit (0 = no limit)
4040
virtual Error correlateProfileData(int MaxWarnings) = 0;
4141

42+
virtual Error correlateCovUnusedFuncNames(int MaxWarnings) = 0;
43+
4244
/// Process debug info and dump the correlation data.
4345
/// \param MaxWarnings the maximum number of warnings to emit (0 = no limit)
4446
virtual Error dumpYaml(int MaxWarnings, raw_ostream &OS) = 0;
@@ -52,6 +54,12 @@ class InstrProfCorrelator {
5254
/// Return the number of bytes in the names string.
5355
size_t getNamesSize() const { return Names.size(); }
5456

57+
const char *getCovUnusedFuncNamesPointer() const {
58+
return CovUnusedFuncNames.c_str();
59+
}
60+
61+
size_t getCovUnusedFuncNamesSize() const { return CovUnusedFuncNames.size(); }
62+
5563
/// Return the size of the counters section in bytes.
5664
uint64_t getCountersSectionSize() const {
5765
return Ctx->CountersSectionEnd - Ctx->CountersSectionStart;
@@ -60,6 +68,7 @@ class InstrProfCorrelator {
6068
static const char *FunctionNameAttributeName;
6169
static const char *CFGHashAttributeName;
6270
static const char *NumCountersAttributeName;
71+
static const char *CovFunctionNameAttributeName;
6372

6473
enum InstrProfCorrelatorKind { CK_32Bit, CK_64Bit };
6574
InstrProfCorrelatorKind getKind() const { return Kind; }
@@ -83,6 +92,7 @@ class InstrProfCorrelator {
8392

8493
std::string Names;
8594
std::vector<std::string> NamesVec;
95+
std::string CovUnusedFuncNames;
8696

8797
struct Probe {
8898
std::string FunctionName;
@@ -205,6 +215,8 @@ class DwarfInstrProfCorrelator : public InstrProfCorrelatorImpl<IntPtrT> {
205215
void correlateProfileDataImpl(
206216
int MaxWarnings,
207217
InstrProfCorrelator::CorrelationData *Data = nullptr) override;
218+
219+
Error correlateCovUnusedFuncNames(int MaxWarnings) override;
208220
};
209221

210222
} // end namespace llvm

llvm/lib/ProfileData/Coverage/CoverageMapping.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ Error CoverageMapping::loadFromFile(
361361

362362
SmallVector<object::BuildIDRef> BinaryIDs;
363363
auto CoverageReadersOrErr = BinaryCoverageReader::create(
364-
CovMappingBufRef, Arch, Buffers, CompilationDir,
364+
CovMappingBufRef, ProfileReader, Arch, Buffers, CompilationDir,
365365
FoundBinaryIDs ? &BinaryIDs : nullptr);
366366
if (Error E = CoverageReadersOrErr.takeError()) {
367367
E = handleMaybeNoDataFoundError(std::move(E));

llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp

Lines changed: 42 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "llvm/Object/MachOUniversal.h"
2626
#include "llvm/Object/ObjectFile.h"
2727
#include "llvm/ProfileData/InstrProf.h"
28+
#include "llvm/ProfileData/InstrProfReader.h"
2829
#include "llvm/Support/Casting.h"
2930
#include "llvm/Support/Compression.h"
3031
#include "llvm/Support/Debug.h"
@@ -1021,8 +1022,23 @@ static Expected<std::vector<SectionRef>> lookupSections(ObjectFile &OF,
10211022
return Sections;
10221023
}
10231024

1025+
static Error getProfileNamesFromDebugInfo(StringRef FileName,
1026+
InstrProfSymtab &ProfileNames) {
1027+
std::unique_ptr<InstrProfCorrelator> Correlator;
1028+
if (auto E = InstrProfCorrelator::get(FileName).moveInto(Correlator))
1029+
return E;
1030+
if (auto E = Correlator->correlateCovUnusedFuncNames(0))
1031+
return E;
1032+
if (auto E = ProfileNames.create(
1033+
StringRef(Correlator->getCovUnusedFuncNamesPointer(),
1034+
Correlator->getCovUnusedFuncNamesSize())))
1035+
return E;
1036+
return Error::success();
1037+
}
1038+
10241039
static Expected<std::unique_ptr<BinaryCoverageReader>>
1025-
loadBinaryFormat(std::unique_ptr<Binary> Bin, StringRef Arch,
1040+
loadBinaryFormat(std::unique_ptr<Binary> Bin,
1041+
IndexedInstrProfReader &ProfileReader, StringRef Arch,
10261042
StringRef CompilationDir = "",
10271043
object::BuildIDRef *BinaryID = nullptr) {
10281044
std::unique_ptr<ObjectFile> OF;
@@ -1052,11 +1068,24 @@ loadBinaryFormat(std::unique_ptr<Binary> Bin, StringRef Arch,
10521068

10531069
// Look for the sections that we are interested in.
10541070
auto ObjFormat = OF->getTripleObjectFormat();
1071+
InstrProfSymtab ProfileNames = ProfileReader.getSymtab();
10551072
auto NamesSection =
10561073
lookupSections(*OF, getInstrProfSectionName(IPSK_name, ObjFormat,
1057-
/*AddSegmentInfo=*/false));
1058-
if (auto E = NamesSection.takeError())
1059-
return std::move(E);
1074+
/*AddSegmentInfo=*/false));
1075+
if (auto E = NamesSection.takeError()) {
1076+
if (OF->hasDebugInfo()) {
1077+
if (auto E =
1078+
getProfileNamesFromDebugInfo(OF->getFileName(), ProfileNames))
1079+
return make_error<CoverageMapError>(coveragemap_error::malformed);
1080+
}
1081+
consumeError(std::move(E));
1082+
} else {
1083+
std::vector<SectionRef> NamesSectionRefs = *NamesSection;
1084+
if (NamesSectionRefs.size() != 1)
1085+
return make_error<CoverageMapError>(coveragemap_error::malformed);
1086+
if (Error E = ProfileNames.create(NamesSectionRefs.back()))
1087+
return std::move(E);
1088+
}
10601089
auto CoverageSection =
10611090
lookupSections(*OF, getInstrProfSectionName(IPSK_covmap, ObjFormat,
10621091
/*AddSegmentInfo=*/false));
@@ -1071,15 +1100,6 @@ loadBinaryFormat(std::unique_ptr<Binary> Bin, StringRef Arch,
10711100
return CoverageMappingOrErr.takeError();
10721101
StringRef CoverageMapping = CoverageMappingOrErr.get();
10731102

1074-
InstrProfSymtab ProfileNames;
1075-
std::vector<SectionRef> NamesSectionRefs = *NamesSection;
1076-
if (NamesSectionRefs.size() != 1)
1077-
return make_error<CoverageMapError>(
1078-
coveragemap_error::malformed,
1079-
"the size of coverage mapping section is not one");
1080-
if (Error E = ProfileNames.create(NamesSectionRefs.back()))
1081-
return std::move(E);
1082-
10831103
// Look for the coverage records section (Version4 only).
10841104
auto CoverageRecordsSections =
10851105
lookupSections(*OF, getInstrProfSectionName(IPSK_covfun, ObjFormat,
@@ -1149,7 +1169,8 @@ static bool isArchSpecifierInvalidOrMissing(Binary *Bin, StringRef Arch) {
11491169

11501170
Expected<std::vector<std::unique_ptr<BinaryCoverageReader>>>
11511171
BinaryCoverageReader::create(
1152-
MemoryBufferRef ObjectBuffer, StringRef Arch,
1172+
MemoryBufferRef ObjectBuffer, IndexedInstrProfReader &ProfileReader,
1173+
StringRef Arch,
11531174
SmallVectorImpl<std::unique_ptr<MemoryBuffer>> &ObjectFileBuffers,
11541175
StringRef CompilationDir, SmallVectorImpl<object::BuildIDRef> *BinaryIDs) {
11551176
std::vector<std::unique_ptr<BinaryCoverageReader>> Readers;
@@ -1195,8 +1216,8 @@ BinaryCoverageReader::create(
11951216
}
11961217

11971218
return BinaryCoverageReader::create(
1198-
ArchiveOrErr.get()->getMemoryBufferRef(), Arch, ObjectFileBuffers,
1199-
CompilationDir, BinaryIDs);
1219+
ArchiveOrErr.get()->getMemoryBufferRef(), ProfileReader, Arch,
1220+
ObjectFileBuffers, CompilationDir, BinaryIDs);
12001221
}
12011222
}
12021223

@@ -1209,8 +1230,8 @@ BinaryCoverageReader::create(
12091230
return ChildBufOrErr.takeError();
12101231

12111232
auto ChildReadersOrErr = BinaryCoverageReader::create(
1212-
ChildBufOrErr.get(), Arch, ObjectFileBuffers, CompilationDir,
1213-
BinaryIDs);
1233+
ChildBufOrErr.get(), ProfileReader, Arch, ObjectFileBuffers,
1234+
CompilationDir, BinaryIDs);
12141235
if (!ChildReadersOrErr)
12151236
return ChildReadersOrErr.takeError();
12161237
for (auto &Reader : ChildReadersOrErr.get())
@@ -1230,8 +1251,9 @@ BinaryCoverageReader::create(
12301251
}
12311252

12321253
object::BuildIDRef BinaryID;
1233-
auto ReaderOrErr = loadBinaryFormat(std::move(Bin), Arch, CompilationDir,
1234-
BinaryIDs ? &BinaryID : nullptr);
1254+
auto ReaderOrErr =
1255+
loadBinaryFormat(std::move(Bin), ProfileReader, Arch, CompilationDir,
1256+
BinaryIDs ? &BinaryID : nullptr);
12351257
if (!ReaderOrErr)
12361258
return ReaderOrErr.takeError();
12371259
Readers.push_back(std::move(ReaderOrErr.get()));

0 commit comments

Comments
 (0)