[ was: Re: [RFC] Dump function attributes ]

On 28/09/15 17:17, Bernd Schmidt wrote:
On 09/28/2015 04:32 PM, Tom de Vries wrote:
patch below prints the function attributes in the dump file.

foo ()
[ noclone , noinline ]
{
...

Good idea?

If so, do we want one attribute per line?

Only for really long ones I'd think. Patch is ok for now.



Reposting patch with ChangeLog entry added.

Bootstrapped and reg-tested on x86_64.

Committed to trunk.

Thanks,
- Tom
Dump function attributes

2015-09-29  Tom de Vries  <t...@codesourcery.com>

	* tree-cfg.c (dump_function_to_file): Dump function attributes.
---
 gcc/tree-cfg.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 807d96f..08935ac 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -7369,6 +7369,13 @@ dump_function_to_file (tree fndecl, FILE *file, int flags)
     }
   fprintf (file, ")\n");
 
+  if (DECL_ATTRIBUTES (fndecl) != NULL_TREE)
+    {
+      fprintf (file, "[ ");
+      print_generic_expr (file, DECL_ATTRIBUTES (fndecl), dump_flags);
+      fprintf (file, "]\n");
+    }
+
   if (flags & TDF_VERBOSE)
     print_node (file, "", fndecl, 2);
 
-- 
1.9.1

Reply via email to