[PATCH] Dump static chain for cgraph_node.

Martin Liška mliska@suse.cz
Mon Nov 8 10:53:21 GMT 2021


Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

Ready to be installed?
Thanks,
Martin

gcc/ChangeLog:

	* cgraph.c (cgraph_node::dump): Dump static_chain_decl.
---
  gcc/cgraph.c | 4 ++++
  1 file changed, 4 insertions(+)

diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index de078653781..8299ee92946 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -2203,6 +2203,10 @@ cgraph_node::dump (FILE *f)
      fprintf (f, " %soperator_delete",
  	     DECL_IS_REPLACEABLE_OPERATOR (decl) ? "replaceable_" : "");
  
+  function *fn = DECL_STRUCT_FUNCTION (decl);
+  if (fn != NULL && fn->static_chain_decl)
+    fprintf (f, " static_chain_decl");
+
    fprintf (f, "\n");
  
    if (thunk)
-- 
2.33.1



More information about the Gcc-patches mailing list