diff options
author | Xinliang David Li <davidxl@google.com> | 2017-04-13 23:37:12 +0000 |
---|---|---|
committer | Xinliang David Li <davidxl@google.com> | 2017-04-13 23:37:12 +0000 |
commit | 57dea2d3591791147436dea198a13f7c3c82caea (patch) | |
tree | 64a6e9f9e8dd48fcb53b9a18dfc47643c3cf67b4 /llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp | |
parent | c5779460f4cbea38dc77911b667a6d76c79c1a3f (diff) | |
download | llvm-57dea2d3591791147436dea198a13f7c3c82caea.zip llvm-57dea2d3591791147436dea198a13f7c3c82caea.tar.gz llvm-57dea2d3591791147436dea198a13f7c3c82caea.tar.bz2 |
[Profile] PE binary coverage bug fix
PR/32584
Differential Revision: https://reviews.llvm.org/D32023
llvm-svn: 300277
Diffstat (limited to 'llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp')
-rw-r--r-- | llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp b/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp index 05c5b28..515f19a 100644 --- a/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp +++ b/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp @@ -648,11 +648,15 @@ static Error loadBinaryFormat(MemoryBufferRef ObjectBuffer, : support::endianness::big; // Look for the sections that we are interested in. - auto NamesSection = lookupSection(*OF, getInstrProfNameSectionName(false)); + // TODO: with the current getInstrProfXXXSectionName interfaces, the + // the coverage reader host tool is limited to read coverage section on + // binaries with compatible profile section naming scheme as the host + // platform. Currently, COFF format binaries have different section + // naming scheme from the all the rest. + auto NamesSection = lookupSection(*OF, getInstrProfNameSectionName()); if (auto E = NamesSection.takeError()) return E; - auto CoverageSection = - lookupSection(*OF, getInstrProfCoverageSectionName(false)); + auto CoverageSection = lookupSection(*OF, getInstrProfCoverageSectionName()); if (auto E = CoverageSection.takeError()) return E; |