llvm.org GIT mirror llvm / 7dcb168
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206646 91177308-0d34-0410-b5e6-96231b3b80d8 Chandler Carruth 6 years ago
1 changed file(s) with 7 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
6464 findCallees(Worklist, Visited, Callees, CalleeSet);
6565 }
6666
67 LazyCallGraph::LazyCallGraph(Module &M) {
67 LazyCallGraph::LazyCallGraph(Module &M) : NextDFSNumber(0) {
6868 for (Function &F : M)
6969 if (!F.isDeclaration() && !F.hasLocalLinkage())
7070 if (EntryNodeSet.insert(&F))
8888 }
8989
9090 LazyCallGraph::LazyCallGraph(LazyCallGraph &&G)
91 : BPA(std::move(G.BPA)), EntryNodes(std::move(G.EntryNodes)),
91 : BPA(std::move(G.BPA)), NodeMap(std::move(G.NodeMap)),
92 EntryNodes(std::move(G.EntryNodes)),
9293 EntryNodeSet(std::move(G.EntryNodeSet)), SCCBPA(std::move(G.SCCBPA)),
9394 SCCMap(std::move(G.SCCMap)), LeafSCCs(std::move(G.LeafSCCs)),
9495 DFSStack(std::move(G.DFSStack)),
95 SCCEntryNodes(std::move(G.SCCEntryNodes)) {
96 SCCEntryNodes(std::move(G.SCCEntryNodes)),
97 NextDFSNumber(G.NextDFSNumber) {
9698 updateGraphPtrs();
9799 }
98100
99101 LazyCallGraph &LazyCallGraph::operator=(LazyCallGraph &&G) {
100102 BPA = std::move(G.BPA);
103 NodeMap = std::move(G.NodeMap);
101104 EntryNodes = std::move(G.EntryNodes);
102105 EntryNodeSet = std::move(G.EntryNodeSet);
103106 SCCBPA = std::move(G.SCCBPA);
105108 LeafSCCs = std::move(G.LeafSCCs);
106109 DFSStack = std::move(G.DFSStack);
107110 SCCEntryNodes = std::move(G.SCCEntryNodes);
111 NextDFSNumber = G.NextDFSNumber;
108112 updateGraphPtrs();
109113 return *this;
110114 }