[llvm-branch-commits] [llvm-branch] r101923 - /llvm/branches/Apple/Morbo/lib/Analysis/IPA/CallGraph.cpp

Dale Johannesen dalej at apple.com
Tue Apr 20 11:13:27 PDT 2010


Author: johannes
Date: Tue Apr 20 13:13:26 2010
New Revision: 101923

URL: http://llvm.org/viewvc/llvm-project?rev=101923&view=rev
Log:
Merge fix for PR 6680.
--- Merging r101897 into '.':
U    lib/Analysis/IPA/CallGraph.cpp


Modified:
    llvm/branches/Apple/Morbo/lib/Analysis/IPA/CallGraph.cpp

Modified: llvm/branches/Apple/Morbo/lib/Analysis/IPA/CallGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/Analysis/IPA/CallGraph.cpp?rev=101923&r1=101922&r2=101923&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/Analysis/IPA/CallGraph.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/Analysis/IPA/CallGraph.cpp Tue Apr 20 13:13:26 2010
@@ -158,9 +158,11 @@
   // destroy - Release memory for the call graph
   virtual void destroy() {
     /// CallsExternalNode is not in the function map, delete it explicitly.
-    CallsExternalNode->allReferencesDropped();
-    delete CallsExternalNode;
-    CallsExternalNode = 0;
+    if (CallsExternalNode) {
+      CallsExternalNode->allReferencesDropped();
+      delete CallsExternalNode;
+      CallsExternalNode = 0;
+    }
     CallGraph::destroy();
   }
 };





More information about the llvm-branch-commits mailing list