Fix a bug introduced by revision 1.187 of this file.
authorChris Lattner <sabre@nondot.org>
Thu, 24 Feb 2005 18:48:07 +0000 (18:48 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 24 Feb 2005 18:48:07 +0000 (18:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20308 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DataStructure/DataStructure.cpp

index 98fb07dff2d5d5b9eb47312e3d803630e5f06231..b32bd912db0632c4fe94a10ee25d980b17eb1c44 100644 (file)
@@ -1925,11 +1925,12 @@ void DSGraph::removeDeadNodes(unsigned Flags) {
     // The final unresolved call nodes must be handled specially at the end of
     // the BU pass (i.e., in main or other roots of the call graph).
     for (afc_iterator CI = afc_begin(), E = afc_end(); CI != E; ++CI)
-      if (AuxFCallsAlive.insert(&*CI).second &&
+      if (!AuxFCallsAlive.count(&*CI) &&
           (CI->isIndirectCall()
            || CallSiteUsesAliveArgs(*CI, Alive, Visited,
                                   Flags & DSGraph::RemoveUnreachableGlobals))) {
         CI->markReachableNodes(Alive);
+        AuxFCallsAlive.insert(&*CI);
         Iterate = true;
       }
   } while (Iterate);