aboutsummaryrefslogtreecommitdiff
path: root/gcc/dumpfile.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2017-05-11 15:48:51 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2017-05-11 15:48:51 +0000
commitc24e924f928e7a092a7dd829a6eb95c2c95625a3 (patch)
treec9c6ce3724ccca0a8b77c6921f9f1419ba1db0d3 /gcc/dumpfile.c
parent2e3757e78af922758a8ec45c4af78159384a6091 (diff)
downloadgcc-c24e924f928e7a092a7dd829a6eb95c2c95625a3.zip
gcc-c24e924f928e7a092a7dd829a6eb95c2c95625a3.tar.gz
gcc-c24e924f928e7a092a7dd829a6eb95c2c95625a3.tar.bz2
dumpfle.h (dump_function): Declare here ...
* dumpfle.h (dump_function): Declare here ... * tree-dump.h (dump_function): ... not here. * dumpfile.c: #include tree-cfg.h. (dump_function): Move here from ... * tree-dump.c (dump_function): ... here. * gimplify.c: #include splay-tree.h, not tree-dump.h. * graphite-poly.c: Don't include tree-dump.h. * cgraphclones.c: Include dumpfile.h not tree-dump.h. * print-tree.c: Likewise. * stor-layout.c: Likewise. * tree-nested.c: Likewise. c/ * gimple-parser.c: Don't #include tree-dump.h. fortran/ * trans-decl.c: Include dumpfile.h not tree-dump.h, From-SVN: r247916
Diffstat (limited to 'gcc/dumpfile.c')
-rw-r--r--gcc/dumpfile.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/dumpfile.c b/gcc/dumpfile.c
index d2e6d3e..d9a84ff 100644
--- a/gcc/dumpfile.c
+++ b/gcc/dumpfile.c
@@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see
#include "diagnostic-core.h"
#include "dumpfile.h"
#include "context.h"
+#include "tree-cfg.h"
/* If non-NULL, return one past-the-end of the matching SUBPART of
the WHOLE string. */
@@ -980,6 +981,22 @@ dump_basic_block (int dump_kind, basic_block bb, int indent)
dump_bb (alt_dump_file, bb, indent, TDF_DETAILS);
}
+/* Dump FUNCTION_DECL FN as tree dump PHASE. */
+
+void
+dump_function (int phase, tree fn)
+{
+ FILE *stream;
+ int flags;
+
+ stream = dump_begin (phase, &flags);
+ if (stream)
+ {
+ dump_function_to_file (fn, stream, flags);
+ dump_end (phase, stream);
+ }
+}
+
/* Print information from the combine pass on dump_file. */
void