Index: lib/Transforms/IPO/SampleProfile.cpp =================================================================== --- lib/Transforms/IPO/SampleProfile.cpp +++ lib/Transforms/IPO/SampleProfile.cpp @@ -588,17 +588,12 @@ if (!DIL) { return Samples; } - StringRef CalleeName; - for (const DILocation *DIL = Inst.getDebugLoc(); DIL; - DIL = DIL->getInlinedAt()) { + for (DIL = DIL->getInlinedAt(); DIL; DIL = DIL->getInlinedAt()) { DISubprogram *SP = DIL->getScope()->getSubprogram(); if (!SP) return nullptr; - if (!CalleeName.empty()) { - S.push_back(LineLocation(getOffset(DIL->getLine(), SP->getLine()), - DIL->getDiscriminator())); - } - CalleeName = SP->getLinkageName(); + S.push_back(LineLocation(getOffset(DIL->getLine(), SP->getLine()), + DIL->getDiscriminator())); } if (S.size() == 0) return Samples;