diff --git a/llvm/include/llvm/ADT/DirectedGraph.h b/llvm/include/llvm/ADT/DirectedGraph.h --- a/llvm/include/llvm/ADT/DirectedGraph.h +++ b/llvm/include/llvm/ADT/DirectedGraph.h @@ -172,9 +172,9 @@ /// Each edge contains the target node it connects to. template class DirectedGraph { protected: - using NodeListTy = SmallVector; using EdgeListTy = SmallVector; public: + using NodeListTy = SmallVector; using iterator = typename NodeListTy::iterator; using const_iterator = typename NodeListTy::const_iterator; using DGraphType = DirectedGraph; @@ -183,6 +183,7 @@ explicit DirectedGraph(NodeType &N) : Nodes() { addNode(N); } DirectedGraph(const DGraphType &G) : Nodes(G.Nodes) {} DirectedGraph(DGraphType &&RHS) : Nodes(std::move(RHS.Nodes)) {} + DirectedGraph(NodeListTy Nodes) : Nodes(std::move(Nodes)) {} DGraphType &operator=(const DGraphType &G) { Nodes = G.Nodes; return *this;