diff options
-rw-r--r-- | llvm/include/llvm/ADT/DirectedGraph.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/include/llvm/ADT/DirectedGraph.h b/llvm/include/llvm/ADT/DirectedGraph.h index f6a358d99cd..cfe98e178a9 100644 --- a/llvm/include/llvm/ADT/DirectedGraph.h +++ b/llvm/include/llvm/ADT/DirectedGraph.h @@ -48,6 +48,9 @@ public: static_cast<const DGEdge<NodeType, EdgeType> &>(*this).getTargetNode()); } + /// Set the target node this edge connects to. + void setTargetNode(const NodeType &N) { TargetNode = N; } + protected: // As the default implementation use address comparison for equality. bool isEqualTo(const EdgeType &E) const { return this == &E; } |