[llvm] [SampleProfile] Fix bug where remapper returns empty string and crashing Sample Profile loader (PR #71479)

David Li via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 9 09:57:44 PST 2023


================
@@ -1630,7 +1630,7 @@ void SampleProfileLoader::promoteMergeNotInlinedContextSamples(
         // separate map so that it does not rehash the original profile.
         if (!OutlineFS)
           OutlineFS = &OutlineFunctionSamples[
-              FunctionSamples::getCanonicalFnName(Callee->getName())];
+              FunctionId(FunctionSamples::getCanonicalFnName(Callee->getName()))];
----------------
david-xl wrote:

Should the StringRef based constructor in SampleConext be removed to avoid future confusion?

https://github.com/llvm/llvm-project/pull/71479


More information about the llvm-commits mailing list