Add helper functions and remove hard coded references to instProf related name/name-prefixes
This is a clean up patch that defines instr prof section and variable name prefixes in a common header with access helper functions. clang FE change will be done as a follow up once this patch is in. Differential Revision: http://reviews.llvm.org/D13919 llvm-svn: 251058
This commit is contained in:
@@ -477,10 +477,11 @@ static std::error_code loadBinaryFormat(MemoryBufferRef ObjectBuffer,
|
||||
: support::endianness::big;
|
||||
|
||||
// Look for the sections that we are interested in.
|
||||
auto NamesSection = lookupSection(*OF, "__llvm_prf_names");
|
||||
auto NamesSection = lookupSection(*OF, getInstrProfNameSectionName(false));
|
||||
if (auto EC = NamesSection.getError())
|
||||
return EC;
|
||||
auto CoverageSection = lookupSection(*OF, "__llvm_covmap");
|
||||
auto CoverageSection =
|
||||
lookupSection(*OF, getInstrProfCoverageSectionName(false));
|
||||
if (auto EC = CoverageSection.getError())
|
||||
return EC;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user