diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2017-08-05 03:37:39 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2017-08-05 03:37:39 +0000 |
commit | 403d3c4b2b68d510b3bbb84ba683e99c7ba2e8e6 (patch) | |
tree | 9e3716a1c973ac00e901158721c30598d89244ac /llvm/lib/Analysis/LazyCallGraph.cpp | |
parent | 7cb23e705f72e7143a9804980eafcae75f76d757 (diff) | |
download | bcm5719-llvm-403d3c4b2b68d510b3bbb84ba683e99c7ba2e8e6.tar.gz bcm5719-llvm-403d3c4b2b68d510b3bbb84ba683e99c7ba2e8e6.zip |
[LCG] When removing a dead function and clearing out the data
structures, actually null out the graph pointers as well. We won't ever
update these, and we certainly shouldn't be calling any methods on them,
so it seems good to defensively nuke them.
llvm-svn: 310164
Diffstat (limited to 'llvm/lib/Analysis/LazyCallGraph.cpp')
-rw-r--r-- | llvm/lib/Analysis/LazyCallGraph.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/LazyCallGraph.cpp b/llvm/lib/Analysis/LazyCallGraph.cpp index b64129b33dc..7d38dd945ab 100644 --- a/llvm/lib/Analysis/LazyCallGraph.cpp +++ b/llvm/lib/Analysis/LazyCallGraph.cpp @@ -1672,8 +1672,10 @@ void LazyCallGraph::removeDeadFunction(Function &F) { // Finally clear out all the data structures from the node down through the // components. N.clear(); + N.G = nullptr; C.clear(); RC.clear(); + RC.G = nullptr; // Nothing to delete as all the objects are allocated in stable bump pointer // allocators. |