re PR debug/66691 (ICE on valid code at -O3 with -g enabled in simplify_subreg, at...
[gcc.git] / gcc / dumpfile.h
index a6b377eaf8c9336c4ba04fc246fe14bda3c51b61..a3334f64b88f5dec25814e3a3ec0ead182d6c7d0 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions for the shared dumpfile.
-   Copyright (C) 2004-2013 Free Software Foundation, Inc.
+   Copyright (C) 2004-2015 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -21,7 +21,6 @@ along with GCC; see the file COPYING3.  If not see
 #ifndef GCC_DUMPFILE_H
 #define GCC_DUMPFILE_H 1
 
-#include "line-map.h"
 
 /* Different tree dump places.  When you add new tree dump places,
    extend the DUMP_FILES array in dumpfile.c.  */
@@ -118,6 +117,9 @@ struct dump_file_info
   int pstate;                   /* state of pass-specific stream */
   int alt_state;                /* state of the -fopt-info stream */
   int num;                      /* dump file number */
+  bool owns_strings;            /* fields "suffix", "swtch", "glob" can be
+                                  const strings, or can be dynamically
+                                  allocated, needing free.  */
 };
 
 /* In dumpfile.c */
@@ -164,20 +166,32 @@ class dump_manager
 public:
 
   dump_manager ();
+  ~dump_manager ();
 
+  /* Register a dumpfile.
+
+     TAKE_OWNERSHIP determines whether callee takes ownership of strings
+     SUFFIX, SWTCH, and GLOB. */
   unsigned int
   dump_register (const char *suffix, const char *swtch, const char *glob,
-                int flags, int optgroup_flags);
+                int flags, int optgroup_flags,
+                bool take_ownership);
 
   /* Return the dump_file_info for the given phase.  */
   struct dump_file_info *
   get_dump_file_info (int phase) const;
 
+  struct dump_file_info *
+  get_dump_file_info_by_switch (const char *swtch) const;
+
   /* Return the name of the dump file for the given phase.
      If the dump is not enabled, returns NULL.  */
   char *
   get_dump_file_name (int phase) const;
 
+  char *
+  get_dump_file_name (struct dump_file_info *dfi) const;
+
   int
   dump_switch_p (const char *arg);