This is an archive of the discontinued LLVM Phabricator instance.

[ADT] Add some documentation for GraphTraits.
ClosedPublic

Authored by timshen on Jul 31 2018, 5:22 PM.

Event Timeline

timshen created this revision.Jul 31 2018, 5:22 PM
dberris added inline comments.
llvm/include/llvm/ADT/GraphTraits.h
28–30

Typo: "facncier"

Also, this could be a simpler sentence without "value judgments". Something like:

// This template evolved from supporting `BasicBlock` to also later supporting
// more complex types (e.g. CFG and DomTree).
32–35

I suggest simplifying as well, maybe like:

// GraphTraits can be used to create a view over a graph interpreting it
// differently without requiring a copy of the original graph. This could
// be used for working with NodeRef's and loop bodies (see LoopBodyTraits
// for one example).

+1 on both dberris's comments.

Thank you for the additional documentation!

timshen updated this revision to Diff 158589.Aug 1 2018, 11:42 AM

Update based on comments.

timshen marked 2 inline comments as done.Aug 1 2018, 11:42 AM
dberris accepted this revision.Aug 1 2018, 4:49 PM

LGTM -- thanks for the additional documentation!

This revision is now accepted and ready to land.Aug 1 2018, 4:49 PM
This revision was automatically updated to reflect the committed changes.