This is a version of D32090 [1] that removes all of the getInstrProf*SectionName helper functions. The build failures which D32090 would have addressed were fixed with D32073 [2].
I think we should remove these helper functions because they are hard to maintain and use. E.g we had to introduce more helpers to fix our COFF support. The current scheme doesn't totally succeed at hiding low-level details about the section naming scheme from clients, so I think we should move to a more flexible API. We can clean things up by unifying the various helpers into function which accepts an ObjectFileFormat instead of a mix of llvm::Module and bools.
There is a compiler-rt change not shown here (we have to sync up the copies of InstrProfData.inc). There is also one clang change:
std::string getCoverageSection(const CodeGenModule &CGM) { - return llvm::getInstrProfCoverageSectionName(&CGM.getModule()); + return llvm::getInstrProfSectionName( + llvm::IPSK_covmap, + CGM.getContext().getTargetInfo().getTriple().getObjectFormat()); }
Testing: check-clang, check-profile, check-llvm. I haven't tested this on Windows.
[1] https://reviews.llvm.org/D32090
[InstrProf] Fix Windows cross compilation TODOs to fix failing tests
[2] https://reviews.llvm.org/D32073
[ProfileData] Support cross target binary reading for coverage tool
Is there a need to keep these wrappers? Seems good to remove too.