[llvm-commits] [llvm] r101897 - /llvm/trunk/lib/Analysis/IPA/CallGraph.cpp
Benjamin Kramer
benny.kra at googlemail.com
Tue Apr 20 05:16:50 PDT 2010
Author: d0k
Date: Tue Apr 20 07:16:50 2010
New Revision: 101897
URL: http://llvm.org/viewvc/llvm-project?rev=101897&view=rev
Log:
PR6880: Don't dereference CallsExternalNode if it's NULL.
Modified:
llvm/trunk/lib/Analysis/IPA/CallGraph.cpp
Modified: llvm/trunk/lib/Analysis/IPA/CallGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/CallGraph.cpp?rev=101897&r1=101896&r2=101897&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/IPA/CallGraph.cpp (original)
+++ llvm/trunk/lib/Analysis/IPA/CallGraph.cpp Tue Apr 20 07:16:50 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-commits
mailing list