[PATCH] D68474: [DirectedGraph]: Add setTargetNode member function

Ettore Tiotto via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 4 11:20:20 PDT 2019


etiotto created this revision.
etiotto added reviewers: bmahjour, Whitney.
Herald added subscribers: llvm-commits, kristina, dexonsmith.
Herald added a project: LLVM.

Add the setTargetNode member function to class DGEdge.


Repository:
  rL LLVM

https://reviews.llvm.org/D68474

Files:
  llvm/include/llvm/ADT/DirectedGraph.h


Index: llvm/include/llvm/ADT/DirectedGraph.h
===================================================================
--- llvm/include/llvm/ADT/DirectedGraph.h
+++ llvm/include/llvm/ADT/DirectedGraph.h
@@ -48,6 +48,9 @@
         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; }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68474.223252.patch
Type: text/x-patch
Size: 568 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191004/ed35d9e5/attachment.bin>


More information about the llvm-commits mailing list