/* 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.
#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. */
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 */
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);