Call get_input_file_name to get file name.

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

	PR bootstrap/46392
	* gengtype-parse.c (type): Call get_input_file_name to get
	file name.

From-SVN: r166486
This commit is contained in:
H.J. Lu 2010-11-09 13:14:48 +00:00 committed by H.J. Lu
parent a1d8cc63b4
commit a618dbe369
2 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2010-11-09 H.J. Lu <hongjiu.lu@intel.com>
PR bootstrap/46392
* gengtype-parse.c (type): Call get_input_file_name to get
file name.
2010-11-09 Eric Botcazou <ebotcazou@adacore.com>
* tree.h (contains_placeholder_p): Fix comment.

View File

@ -751,7 +751,9 @@ type (options_p *optsp, bool nested)
if (token () == ID)
s = advance ();
else
s = xasprintf ("anonymous:%s:%d", lexer_line.file, lexer_line.line);
s = xasprintf ("anonymous:%s:%d",
get_input_file_name (lexer_line.file),
lexer_line.line);
/* Unfortunately above GTY_TOKEN check does not capture the
typedef struct_type GTY case. */
@ -788,7 +790,9 @@ type (options_p *optsp, bool nested)
if (token () == ID)
s = advance ();
else
s = xasprintf ("anonymous:%s:%d", lexer_line.file, lexer_line.line);
s = xasprintf ("anonymous:%s:%d",
get_input_file_name (lexer_line.file),
lexer_line.line);
if (token () == '{')
consume_balanced ('{', '}');