[PATCH] D23580: [GraphWriter] Change GraphWriter to use NodeRef in GraphTraits

Tim Shen via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 16 20:42:14 PDT 2016


timshen added a comment.

In https://reviews.llvm.org/D23580#517447, @dblaikie wrote:

> what's the printer used for? Would it be best to generalize it (perhaps adding another extension point to the graph traits, so NodeRefs can be printed out - with a default implementation for pointers)?


One usage is to print dot files.

I think it's more like that GraphWriter that requires the input nodes to be both fulfilling GraphTraits, and printable, not that GraphTraits has an optional printable requirement - these are two totally orthogonal traits.


https://reviews.llvm.org/D23580





More information about the llvm-commits mailing list