diff --git a/llvm/lib/ProfileData/SampleProf.cpp b/llvm/lib/ProfileData/SampleProf.cpp index 7f8ccca07cea..9b01a386a360 100644 --- a/llvm/lib/ProfileData/SampleProf.cpp +++ b/llvm/lib/ProfileData/SampleProf.cpp @@ -521,7 +521,7 @@ void CSProfileConverter::convertProfiles(CSProfileConverter::FrameNode &Node) { if (NodeProfile) { // Add child profile to the callsite profile map. auto &SamplesMap = NodeProfile->functionSamplesAt(ChildNode.CallSiteLoc); - SamplesMap.emplace(OrigChildContext.getName(), *ChildProfile); + SamplesMap.emplace(OrigChildContext.getName().str(), *ChildProfile); NodeProfile->addTotalSamples(ChildProfile->getTotalSamples()); }