-Wdeprecated cleanup: Make CallGraph movable by default by using unique_ptr members...
[oota-llvm.git] / lib / Transforms / IPO / Inliner.cpp
index e6d137fa67e82749ad4c83da7e7887a8d5a4829e..b5f58bdf88914436193d73f3886dca9356f5e568 100644 (file)
@@ -649,8 +649,8 @@ bool Inliner::removeDeadFunctions(CallGraph &CG, bool AlwaysInlineOnly) {
 
   // 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;