aboutsummaryrefslogtreecommitdiff
path: root/gcc/dumpfile.c
diff options
context:
space:
mode:
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