summaryrefslogtreecommitdiff
path: root/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
commita30ccb064b8e0d67c26e087b191561ee2e06aac9 (patch)
tree7e9352d7d2d68d7e72dc24ab674b283356fe1ce2 /include
parent40f67f57649860bc676df359325c61abc0157a2e (diff)
downloadllvm-a30ccb064b8e0d67c26e087b191561ee2e06aac9.tar.gz
llvm-a30ccb064b8e0d67c26e087b191561ee2e06aac9.tar.bz2
llvm-a30ccb064b8e0d67c26e087b191561ee2e06aac9.tar.xz
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206450 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/LazyCallGraph.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/include/llvm/Analysis/LazyCallGraph.h b/include/llvm/Analysis/LazyCallGraph.h
index 0215cfc11c..f3c2ed9c1d 100644
--- a/include/llvm/Analysis/LazyCallGraph.h
+++ b/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; }