summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-04-17 07:25:59 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-04-17 07:25:59 +0000
commitb60cb315bc16ba6698b4be56cec850ea284c5876 (patch)
tree27273a703089511ba903b22cb3ecebd50cb6d007 /llvm/include
parent81f497d176acbb98421d4f4263ce46e91a9adc99 (diff)
downloadbcm5719-llvm-b60cb315bc16ba6698b4be56cec850ea284c5876.tar.gz
bcm5719-llvm-b60cb315bc16ba6698b4be56cec850ea284c5876.zip
[LCG] Just move the allocator (now that we can) when moving a call
graph. This simplifies the custom move constructor operation to one of walking the graph and updating the 'up' pointers to point to the new location of the graph. Switch the nodes from a reference to a pointer for the 'up' edge to facilitate this. llvm-svn: 206450
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Analysis/LazyCallGraph.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/include/llvm/Analysis/LazyCallGraph.h b/llvm/include/llvm/Analysis/LazyCallGraph.h
index 0215cfc11c4..f3c2ed9c1d5 100644
--- a/llvm/include/llvm/Analysis/LazyCallGraph.h
+++ b/llvm/include/llvm/Analysis/LazyCallGraph.h
@@ -230,9 +230,6 @@ private:
/// \brief Helper to copy a node from another graph into this one.
Node *copyInto(const Node &OtherN);
-
- /// \brief Helper to move a node from another graph into this one.
- Node *moveInto(Node &&OtherN);
};
/// \brief A node in the call graph.
@@ -243,7 +240,7 @@ private:
class LazyCallGraph::Node {
friend class LazyCallGraph;
- LazyCallGraph &G;
+ LazyCallGraph *G;
Function &F;
mutable NodeVectorT Callees;
SmallPtrSet<Function *, 4> CalleeSet;
@@ -265,8 +262,8 @@ public:
return F;
};
- iterator begin() const { return iterator(G, Callees); }
- iterator end() const { return iterator(G, Callees, iterator::IsAtEndT()); }
+ iterator begin() const { return iterator(*G, Callees); }
+ iterator end() const { return iterator(*G, Callees, iterator::IsAtEndT()); }
/// Equality is defined as address equality.
bool operator==(const Node &N) const { return this == &N; }
OpenPOWER on IntegriCloud