diff options
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp')
-rw-r--r-- | llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp b/llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp index ee111e9d8fe..3cd2bb0eef5 100644 --- a/llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp +++ b/llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp @@ -157,6 +157,9 @@ unsigned CompleteBUDataStructures::calculateSCCGraphs(DSGraph &FG, for (DSGraph::ReturnNodesTy::iterator I = NG->getReturnNodes().begin(); I != NG->getReturnNodes().end(); ++I) DSInfo[I->first] = &FG; + + // Remove NG from the ValMap since the pointer may get recycled. + ValMap.erase(NG); delete NG; Stack.pop_back(); |