diff options
author | David Malcolm <dmalcolm@redhat.com> | 2014-04-29 15:02:16 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2014-04-29 15:02:16 +0000 |
commit | 3979649a7148086396248b93875ec953f0331a33 (patch) | |
tree | 3ac368329de198291a198c5ccbb1046dec702fdd /gcc/tree-cfg.c | |
parent | 62fb101e69b1b1c99e3bf4951616eb3ce3015006 (diff) | |
download | gcc-3979649a7148086396248b93875ec953f0331a33.zip gcc-3979649a7148086396248b93875ec953f0331a33.tar.gz gcc-3979649a7148086396248b93875ec953f0331a33.tar.bz2 |
Dump the return type of functions in gimple dumps
gcc/
* tree-cfg.c (dump_function_to_file): Dump the return type of
functions, in a line to itself before the function body, mimicking
the layout of a C function.
gcc/testsuite/
* gcc.dg/tree-ssa/pr23401.c: Update the expected number of
occurrences of "int" in the gimple dump to reflect that the return
types of functions now show up in such dumps.
* gcc.dg/tree-ssa/pr27810.c: Likewise.
From-SVN: r209902
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r-- | gcc/tree-cfg.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 0fb2681..a5f09ea 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -7086,6 +7086,12 @@ dump_function_to_file (tree fndecl, FILE *file, int flags) struct function *fun = DECL_STRUCT_FUNCTION (fndecl); current_function_decl = fndecl; + + /* Print the return type of the function: */ + print_generic_expr (file, TREE_TYPE (TREE_TYPE (fun->decl)), + dump_flags | TDF_SLIM); + fprintf (file, "\n"); + fprintf (file, "%s %s(", function_name (fun), tmclone ? "[tm-clone] " : ""); arg = DECL_ARGUMENTS (fndecl); |