Commit 0db2cd17 by David Malcolm

analyzer: tweaks to exploded_node ctor

I have followup work that touches this, so it's easiest to get this
cleanup in first.

gcc/analyzer/ChangeLog:
	* engine.cc (exploded_node::exploded_node): Move implementation
	here from header; accept point_and_state by const reference rather
	than by value.
	* exploded-graph.h (exploded_node::exploded_node): Pass
	point_and_state by const reference rather than by value.  Move
	body to engine.cc.
parent e5de406f
2020-03-18 David Malcolm <dmalcolm@redhat.com>
* engine.cc (exploded_node::exploded_node): Move implementation
here from header; accept point_and_state by const reference rather
than by value.
* exploded-graph.h (exploded_node::exploded_node): Pass
point_and_state by const reference rather than by value. Move
body to engine.cc.
2020-03-18 Jakub Jelinek <jakub@redhat.com> 2020-03-18 Jakub Jelinek <jakub@redhat.com>
* sm-malloc.cc (malloc_state_machine::on_stmt): Fix up duplicated word * sm-malloc.cc (malloc_state_machine::on_stmt): Fix up duplicated word
......
...@@ -795,6 +795,17 @@ print_enode_indices (pretty_printer *pp, ...@@ -795,6 +795,17 @@ print_enode_indices (pretty_printer *pp,
} }
} }
/* class exploded_node : public dnode<eg_traits>. */
/* exploded_node's ctor. */
exploded_node::exploded_node (const point_and_state &ps,
int index)
: m_ps (ps), m_status (STATUS_WORKLIST), m_index (index)
{
gcc_checking_assert (ps.get_state ().m_region_model->canonicalized_p ());
}
/* For use by dump_dot, get a value for the .dot "fillcolor" attribute. /* For use by dump_dot, get a value for the .dot "fillcolor" attribute.
Colorize by sm-state, to make it easier to see how sm-state propagates Colorize by sm-state, to make it easier to see how sm-state propagates
through the exploded_graph. */ through the exploded_graph. */
......
...@@ -175,12 +175,7 @@ class exploded_node : public dnode<eg_traits> ...@@ -175,12 +175,7 @@ class exploded_node : public dnode<eg_traits>
STATUS_MERGER STATUS_MERGER
}; };
exploded_node (point_and_state ps, exploded_node (const point_and_state &ps, int index);
int index)
: m_ps (ps), m_status (STATUS_WORKLIST), m_index (index)
{
gcc_checking_assert (ps.get_state ().m_region_model->canonicalized_p ());
}
hashval_t hash () const { return m_ps.hash (); } hashval_t hash () const { return m_ps.hash (); }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment