diff options
Diffstat (limited to 'llvm/lib/Analysis/LazyCallGraph.cpp')
| -rw-r--r-- | llvm/lib/Analysis/LazyCallGraph.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/LazyCallGraph.cpp b/llvm/lib/Analysis/LazyCallGraph.cpp index d31793803ac..128448e4c93 100644 --- a/llvm/lib/Analysis/LazyCallGraph.cpp +++ b/llvm/lib/Analysis/LazyCallGraph.cpp @@ -362,8 +362,8 @@ void LazyCallGraph::removeEdge(Node &CallerN, Function &Callee) { CallerC->removeInternalEdge(*this, CallerN, *CalleeN); } -LazyCallGraph::Node *LazyCallGraph::insertInto(Function &F, Node *&MappedN) { - return new (MappedN = BPA.Allocate()) Node(*this, F); +LazyCallGraph::Node &LazyCallGraph::insertInto(Function &F, Node *&MappedN) { + return *new (MappedN = BPA.Allocate()) Node(*this, F); } void LazyCallGraph::updateGraphPtrs() { @@ -435,8 +435,8 @@ LazyCallGraph::SCC *LazyCallGraph::getNextSCCInPostOrder() { // Reset the DFS numbering. NextDFSNumber = 1; - Node *N = get(*SCCEntryNodes.pop_back_val()); - DFSStack.push_back(std::make_pair(N, N->begin())); + Node &N = get(*SCCEntryNodes.pop_back_val()); + DFSStack.push_back(std::make_pair(&N, N.begin())); } auto SI = DFSStack.rbegin(); |

