From 6ef63638cb8bac243e0e59cec66a19c57b79e351 Mon Sep 17 00:00:00 2001 From: "Tsang Whitney W.H" Date: Sun, 10 Nov 2019 20:00:30 +0000 Subject: [PATCH] [DirectedGraph]: Add setTargetNode member function Summary:Add the setTargetNode member function to class DGEdge. Authored By:etiotto Reviewer:bmahjour, Whitney, jdoerfert, Meinersbur, fhahn, kbarton, dmgreen Reviewed By:Meinersbur Subscribers:dexonsmith, kristina, llvm-commits Tag:LLVM Differential Revision:https://reviews.llvm.org/D68474 --- llvm/include/llvm/ADT/DirectedGraph.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm/include/llvm/ADT/DirectedGraph.h b/llvm/include/llvm/ADT/DirectedGraph.h index f6a358d99cd2..cfe98e178a91 100644 --- a/llvm/include/llvm/ADT/DirectedGraph.h +++ b/llvm/include/llvm/ADT/DirectedGraph.h @@ -48,6 +48,9 @@ public: 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; }