Add check for ENABLE_CHECKING,

2010-11-22  H.J. Lu  <hongjiu.lu@intel.com>

	PR bootstrap/46609
	* gengtype.c (header_dot_h_frul): Check ENABLE_CHECKING.
	(source_dot_c_frul): Likewise.

From-SVN: r167049
This commit is contained in:
H.J. Lu 2010-11-22 19:56:25 +00:00 committed by H.J. Lu
parent a954677191
commit 87e0555a03
2 changed files with 14 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2010-11-22 H.J. Lu <hongjiu.lu@intel.com>
PR bootstrap/46609
* gengtype.c (header_dot_h_frul): Check ENABLE_CHECKING.
(source_dot_c_frul): Likewise.
2010-11-22 Basile Starynkevitch <basile@starynkevitch.net>
* gimple-pretty-print.c (dump_bb_header): Add check for cfun.

View File

@ -1863,16 +1863,21 @@ struct file_rule_st files_rules[] = {
"gtype-desc.c" for common headers and corresponding output
files for language-specific header files. */
static outf_p
header_dot_h_frul (input_file* inpf, char**poutname, char**pforname)
header_dot_h_frul (input_file* inpf, char**poutname,
char**pforname ATTRIBUTE_UNUSED)
{
const char *basename = 0;
int lang_index = 0;
#if ENABLE_CHECKING
const char *inpname = get_input_file_name (inpf);
DBGPRINTF ("inpf %p inpname %s outname %s forname %s",
(void*) inpf, inpname, *poutname, *pforname);
#endif
basename = get_file_basename (inpf);
lang_index = get_prefix_langdir_index (basename);
#if ENABLE_CHECKING
DBGPRINTF ("basename %s lang_index %d", basename, lang_index);
#endif
if (lang_index >= 0)
{
@ -1907,11 +1912,13 @@ source_dot_c_frul (input_file* inpf, char**poutname, char**pforname)
{
char *newbasename = CONST_CAST (char*, get_file_basename (inpf));
char *newoutname = CONST_CAST (char*, get_file_gtfilename (inpf));
#if ENABLE_CHECKING
const char *inpname = get_input_file_name (inpf);
DBGPRINTF ("inpf %p inpname %s original outname %s forname %s",
(void*) inpf, inpname, *poutname, *pforname);
DBGPRINTF ("newoutname %s", newoutname);
DBGPRINTF ("newbasename %s", newbasename);
#endif
free (*poutname);
free (*pforname);
*poutname = newoutname;