Add helper functions and remove hard coded references to instProf related name/name...
[oota-llvm.git] / lib / ProfileData / CoverageMappingReader.cpp
index 334a3f51ec9e5762122890dba46009f7d1ec9a49..7fd5f009a91507fa269189227bf242df2a1a687d 100644 (file)
@@ -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;