diff options
| author | Chandler Carruth <chandlerc@gmail.com> | 2014-04-18 20:44:16 +0000 |
|---|---|---|
| committer | Chandler Carruth <chandlerc@gmail.com> | 2014-04-18 20:44:16 +0000 |
| commit | 2174f44f61ffe1736d64b3a9770ca20ae8e42842 (patch) | |
| tree | 2c034aa782c018608a56aa610fe19f9940e9d43b /llvm/lib/Analysis/LazyCallGraph.cpp | |
| parent | 4aaea17dc997c472517242143dfc2662ced99af4 (diff) | |
| download | bcm5719-llvm-2174f44f61ffe1736d64b3a9770ca20ae8e42842.tar.gz bcm5719-llvm-2174f44f61ffe1736d64b3a9770ca20ae8e42842.zip | |
[LCG] Fix the bugs that Ben pointed out in code review (and the MSan bot
caught). Sad that we don't have warnings for these things, but bleh, no
idea how to fix that.
llvm-svn: 206646
Diffstat (limited to 'llvm/lib/Analysis/LazyCallGraph.cpp')
| -rw-r--r-- | llvm/lib/Analysis/LazyCallGraph.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/LazyCallGraph.cpp b/llvm/lib/Analysis/LazyCallGraph.cpp index 229e2c93ade..a981dcceaad 100644 --- a/llvm/lib/Analysis/LazyCallGraph.cpp +++ b/llvm/lib/Analysis/LazyCallGraph.cpp @@ -65,7 +65,7 @@ LazyCallGraph::Node::Node(LazyCallGraph &G, Function &F) findCallees(Worklist, Visited, Callees, CalleeSet); } -LazyCallGraph::LazyCallGraph(Module &M) { +LazyCallGraph::LazyCallGraph(Module &M) : NextDFSNumber(0) { for (Function &F : M) if (!F.isDeclaration() && !F.hasLocalLinkage()) if (EntryNodeSet.insert(&F)) @@ -89,16 +89,19 @@ LazyCallGraph::LazyCallGraph(Module &M) { } LazyCallGraph::LazyCallGraph(LazyCallGraph &&G) - : BPA(std::move(G.BPA)), EntryNodes(std::move(G.EntryNodes)), + : BPA(std::move(G.BPA)), NodeMap(std::move(G.NodeMap)), + EntryNodes(std::move(G.EntryNodes)), EntryNodeSet(std::move(G.EntryNodeSet)), SCCBPA(std::move(G.SCCBPA)), SCCMap(std::move(G.SCCMap)), LeafSCCs(std::move(G.LeafSCCs)), DFSStack(std::move(G.DFSStack)), - SCCEntryNodes(std::move(G.SCCEntryNodes)) { + SCCEntryNodes(std::move(G.SCCEntryNodes)), + NextDFSNumber(G.NextDFSNumber) { updateGraphPtrs(); } LazyCallGraph &LazyCallGraph::operator=(LazyCallGraph &&G) { BPA = std::move(G.BPA); + NodeMap = std::move(G.NodeMap); EntryNodes = std::move(G.EntryNodes); EntryNodeSet = std::move(G.EntryNodeSet); SCCBPA = std::move(G.SCCBPA); @@ -106,6 +109,7 @@ LazyCallGraph &LazyCallGraph::operator=(LazyCallGraph &&G) { LeafSCCs = std::move(G.LeafSCCs); DFSStack = std::move(G.DFSStack); SCCEntryNodes = std::move(G.SCCEntryNodes); + NextDFSNumber = G.NextDFSNumber; updateGraphPtrs(); return *this; } |

