diff --git a/hilti/toolchain/include/compiler/detail/cfg.h b/hilti/toolchain/include/compiler/detail/cfg.h index db57372e1..91017e653 100644 --- a/hilti/toolchain/include/compiler/detail/cfg.h +++ b/hilti/toolchain/include/compiler/detail/cfg.h @@ -55,9 +55,7 @@ struct Flow : MetaNode { class CFG { public: using N = Node*; - using Node = CXXGraph::Node; - using Edge = CXXGraph::DirectedEdge; - using NodeP = std::shared_ptr; + using NodeP = std::shared_ptr>; CFG(const N& root); diff --git a/hilti/toolchain/src/compiler/cfg.cc b/hilti/toolchain/src/compiler/cfg.cc index 95ba35111..da8b2e15e 100644 --- a/hilti/toolchain/src/compiler/cfg.cc +++ b/hilti/toolchain/src/compiler/cfg.cc @@ -153,12 +153,12 @@ CFG::NodeP CFG::add_return(const NodeP& parent, const N& expression) { return parent; } -std::shared_ptr CFG::get_or_add_node(const N& n) { +std::shared_ptr> CFG::get_or_add_node(const N& n) { const auto& id = node_id(n); if ( auto x = g.getNode(id) ) return *x; - auto y = std::make_shared(id, n); + auto y = std::make_shared>(id, n); g.addNode(y); return y; } @@ -171,7 +171,8 @@ void CFG::add_edge(NodeP from, NodeP to) { xs.end() != std::find_if(xs.begin(), xs.end(), [&](const auto& e) { return e->getNodePair().second == to; }) ) return; else { - auto e = std::make_shared(g.getEdgeSet().size(), std::move(from), std::move(to)); + auto e = + std::make_shared>(g.getEdgeSet().size(), std::move(from), std::move(to)); g.addEdge(std::move(e)); return; }