//===- llvm/ADT/DirectedGraph.h - Directed Graph ----------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// /// /// \file /// This file defines the interface and a base class implementation for a /// directed graph. /// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_DIRECTEDGRAPH_H #define LLVM_ADT_DIRECTEDGRAPH_H #include "llvm/ADT/GraphTraits.h" #include "llvm/ADT/SetVector.h" #include "llvm/ADT/SmallVector.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" namespace llvm { /// Represent an edge in the directed graph. /// The edge contains the target node it connects to. template <class NodeType, class EdgeType> class DGEdge { … }; /// Represent a node in the directed graph. /// The node has a (possibly empty) list of outgoing edges. template <class NodeType, class EdgeType> class DGNode { … }; /// Directed graph /// /// The graph is represented by a table of nodes. /// Each node contains a (possibly empty) list of outgoing edges. /// Each edge contains the target node it connects to. template <class NodeType, class EdgeType> class DirectedGraph { … }; } // namespace llvm #endif // LLVM_ADT_DIRECTEDGRAPH_H