[llvm-commits] [llvm] r80759 - /llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp

Chris Lattner sabre at nondot.org
Tue Sep 1 21:34:07 PDT 2009


Author: lattner
Date: Tue Sep  1 23:34:06 2009
New Revision: 80759

URL: http://llvm.org/viewvc/llvm-project?rev=80759&view=rev
Log:
one more try at making this simpler, hopefully it won't break everything :)

Modified:
    llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp

Modified: llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp?rev=80759&r1=80758&r2=80759&view=diff

==============================================================================
--- llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp (original)
+++ llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp Tue Sep  1 23:34:06 2009
@@ -178,11 +178,11 @@
                "CallGraphSCCPass did not update the CallGraph correctly!");
         
         // Just remove the edge from the set of callees.
-        bool wasLast = I + 1 == E;
         CGN->removeCallEdge(I);
-        if (wasLast)
-          // I is now a singular iterator, do not compare with E.
-          break;
+        
+        // If we removed the last edge, get out of the loop.
+        if (CGN->empty()) break;
+        
         E = CGN->end();
         continue;
       }





More information about the llvm-commits mailing list