diff --git a/llvm/include/llvm/ADT/DirectedGraph.h b/llvm/include/llvm/ADT/DirectedGraph.h index f6a358d99cd231..cfe98e178a91df 100644 --- a/llvm/include/llvm/ADT/DirectedGraph.h +++ b/llvm/include/llvm/ADT/DirectedGraph.h @@ -48,6 +48,9 @@ template class DGEdge { static_cast &>(*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; }