Index: lib/CodeGen/CodeGenPGO.cpp =================================================================== --- lib/CodeGen/CodeGenPGO.cpp +++ lib/CodeGen/CodeGenPGO.cpp @@ -755,6 +755,14 @@ if (!ValuePtr || !ValueSite || !Builder.GetInsertBlock()) return; + // During instrumentation, function pointers are collected for the different + // indirect call targets. Then as part of the conversion from raw to merged + // profile data, these get replaced with md5 function name hashes. (This + // actually happens during deserialization of the raw profdata.) + // + // For this remapping the ProfData is used. ProfData contains both the + // function name hash and the function address. + bool InstrumentValueSites = CGM.getCodeGenOpts().hasProfileClangInstr(); if (InstrumentValueSites && RegionCounterMap) { llvm::LLVMContext &Ctx = CGM.getLLVMContext();