IPO: Remove implicit ilist iterator conversions, NFC
[oota-llvm.git] / lib / Transforms / IPO / StripDeadPrototypes.cpp
index 956991ad1f9562afcc455dbc1f0fae42a01cc6fa..eba79218aed26aa6f74e7359a2ea052e1f792ba5 100644 (file)
@@ -47,7 +47,7 @@ bool StripDeadPrototypesPass::runOnModule(Module &M) {
   
   // Erase dead function prototypes.
   for (Module::iterator I = M.begin(), E = M.end(); I != E; ) {
-    Function *F = I++;
+    Function *F = &*I++;
     // Function must be a prototype and unused.
     if (F->isDeclaration() && F->use_empty()) {
       F->eraseFromParent();
@@ -59,7 +59,7 @@ bool StripDeadPrototypesPass::runOnModule(Module &M) {
   // Erase dead global var prototypes.
   for (Module::global_iterator I = M.global_begin(), E = M.global_end();
        I != E; ) {
-    GlobalVariable *GV = I++;
+    GlobalVariable *GV = &*I++;
     // Global must be a prototype and unused.
     if (GV->isDeclaration() && GV->use_empty())
       GV->eraseFromParent();