// Scan for all of the functions, looking for ones that should now be removed
// from the program. Insert the dead ones in the FunctionsToRemove set.
- for (auto I : CG) {
- CallGraphNode *CGN = I.second;
+ for (const auto &I : CG) {
+ CallGraphNode *CGN = I.second.get();
Function *F = CGN->getFunction();
if (!F || F->isDeclaration())
continue;