re PR debug/4252 (cc1: Invalid option `-fdump-translation-unit')

PR debug/4252
	* c-opts.c (c_common_handle_option): Pass -fdump argument suffix
	to dump_switch_p().
	* tree-dump.c (dump_switch_p): Remove redundant 'dump-' prefix
	from static strings in dump_files.
cp:
	* optimize.c (dump_function): Form complete flag name by
	prefixing 'fdump-' to string returned by dump_flag_name().
java:
	* lang.c (java_handle_option): Likewise.

From-SVN: r68137
This commit is contained in:
Robert Abeles 2003-06-18 05:58:55 +00:00 committed by Neil Booth
parent a1af4623ea
commit f3f735eb70
7 changed files with 26 additions and 9 deletions

View File

@ -1,3 +1,11 @@
2003-06-17 Robert Abeles <rabeles@archaelogic.com>
PR debug/4252
* c-opts.c (c_common_handle_option): Pass -fdump argument suffix
to dump_switch_p().
* tree-dump.c (dump_switch_p): Remove redundant 'dump-' prefix
from static strings in dump_files.
2003-06-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* system.h (ANSI_PROTOTYPES, PTR_CONST, LONG_DOUBLE, VPARAMS,

View File

@ -740,7 +740,7 @@ c_common_handle_option (size_t scode, const char *arg, int value)
break;
case OPT_fdump_:
if (!dump_switch_p (option->opt_text + strlen ("f")))
if (!dump_switch_p (arg))
result = 0;
break;

View File

@ -1,3 +1,8 @@
2003-06-17 Robert Abeles <rabeles@archaelogic.com>
* optimize.c (dump_function): Form complete flag name by
prefixing 'fdump-' to string returned by dump_flag_name().
2003-06-17 Mark Mitchell <mark@codesourcery.com>
* mangle.c (mangle_conv_op_name_for_type): Correct sprintf format

View File

@ -288,7 +288,7 @@ dump_function (enum tree_dump_index phase, tree fn)
decl_as_string (fn, TFF_DECL_SPECIFIERS));
fprintf (stream, " (%s)\n",
decl_as_string (DECL_ASSEMBLER_NAME (fn), 0));
fprintf (stream, ";; enabled by -%s\n", dump_flag_name (phase));
fprintf (stream, ";; enabled by -fdump-%s\n", dump_flag_name (phase));
fprintf (stream, "\n");
dump_node (fn, TDF_SLIM | flags, stream);

View File

@ -1,3 +1,7 @@
2003-06-17 Robert Abeles <rabeles@archaelogic.com>
* lang.c (java_handle_option): Likewise.
2003-06-16 Neil Booth <neil@daikokuya.co.uk>
* lang.c (java_handle_option): Special-casing of optional

View File

@ -376,7 +376,7 @@ java_handle_option (size_t scode, const char *arg, int value)
break;
case OPT_fdump_:
if (!dump_switch_p (option->opt_text + strlen ("f")))
if (!dump_switch_p (arg))
return 0;
break;

View File

@ -646,11 +646,11 @@ struct dump_file_info
TREE_DUMP_INDEX enumeration in tree.h */
static struct dump_file_info dump_files[TDI_end] =
{
{".tu", "dump-translation-unit", 0, 0},
{".class", "dump-class-hierarchy", 0, 0},
{".original", "dump-tree-original", 0, 0},
{".optimized", "dump-tree-optimized", 0, 0},
{".inlined", "dump-tree-inlined", 0, 0},
{".tu", "translation-unit", 0, 0},
{".class", "class-hierarchy", 0, 0},
{".original", "tree-original", 0, 0},
{".optimized", "tree-optimized", 0, 0},
{".inlined", "tree-inlined", 0, 0},
};
/* Define a name->number mapping for a dump flag value. */
@ -758,7 +758,7 @@ dump_switch_p (const char *arg)
flags |= option_ptr->value;
goto found;
}
warning ("ignoring unknown option `%.*s' in `-f%s'",
warning ("ignoring unknown option `%.*s' in `-fdump-%s'",
length, ptr, dump_files[ix].swtch);
found:;
ptr = end_ptr;