Add cgraph_edge::debug function.

gcc/ChangeLog:

	* cgraph.c (cgraph_edge::debug): New.
	* cgraph.h (cgraph_edge::debug): New.
This commit is contained in:
Martin Liska 2020-09-24 16:29:49 +02:00
parent e9e2953ced
commit b2784a9698
2 changed files with 17 additions and 0 deletions

View file

@ -2072,6 +2072,20 @@ cgraph_edge::dump_edge_flags (FILE *f)
fprintf (f, "(can throw external) ");
}
/* Dump edge to stderr. */
void
cgraph_edge::debug (void)
{
fprintf (stderr, "%s -> %s ", caller->dump_asm_name (),
callee == NULL ? "(null)" : callee->dump_asm_name ());
dump_edge_flags (stderr);
fprintf (stderr, "\n\n");
caller->debug ();
if (callee != NULL)
callee->debug ();
}
/* Dump call graph node to file F. */
void

View file

@ -2022,6 +2022,9 @@ private:
/* Output flags of edge to a file F. */
void dump_edge_flags (FILE *f);
/* Dump edge to stderr. */
void DEBUG_FUNCTION debug (void);
/* Verify that call graph edge corresponds to DECL from the associated
statement. Return true if the verification should fail. */
bool verify_corresponds_to_fndecl (tree decl);