Skip to content

Commit

Permalink
[ADT] Add some documentation for GraphTraits.
Browse files Browse the repository at this point in the history
Summary: Add some context for GraphTraits.

Reviewers: dblaikie, asbirlea

Subscribers: sanjoy, jlebar, bixia, dexonsmith, llvm-commits

Differential Revision: https://reviews.llvm.org/D50120

llvm-svn: 338660
  • Loading branch information
timshen91 committed Aug 2, 2018
1 parent ebca0f1 commit 9940682
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions llvm/include/llvm/ADT/GraphTraits.h
Expand Up @@ -25,6 +25,13 @@ namespace llvm {
// GraphTraits - This class should be specialized by different graph types...
// which is why the default version is empty.
//
// This template evolved from supporting `BasicBlock` to also later supporting
// more complex types (e.g. CFG and DomTree).
//
// 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 achieved by carrying more data in NodeRef. See LoopBodyTraits for one
// example.
template<class GraphType>
struct GraphTraits {
// Elements to provide:
Expand Down

0 comments on commit 9940682

Please sign in to comment.