diff --git a/llvm/lib/Transforms/IPO/SampleContextTracker.cpp b/llvm/lib/Transforms/IPO/SampleContextTracker.cpp --- a/llvm/lib/Transforms/IPO/SampleContextTracker.cpp +++ b/llvm/lib/Transforms/IPO/SampleContextTracker.cpp @@ -433,8 +433,7 @@ if (Name.empty()) Name = PrevDIL->getScope()->getSubprogram()->getName(); S.push_back( - std::make_pair(FunctionSamples::getCallSiteIdentifier(DIL), - PrevDIL->getScope()->getSubprogram()->getLinkageName())); + std::make_pair(FunctionSamples::getCallSiteIdentifier(DIL), Name)); PrevDIL = DIL; }