summaryrefslogtreecommitdiffstats
path: root/gcc/gensupport.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-27 10:12:51 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-27 10:12:51 +0000
commitfea520ebeeebe1392a25a319518fb7c9655cb329 (patch)
tree19986beafca6533f327d3eb48031c4616e3a888d /gcc/gensupport.c
parent2789b0849920e070834d3d98aea1d9584371e85a (diff)
downloadppe42-gcc-fea520ebeeebe1392a25a319518fb7c9655cb329.tar.gz
ppe42-gcc-fea520ebeeebe1392a25a319518fb7c9655cb329.zip
* rtl.h (read_rtx): Change prototype.
* read-rtl.c (read_rtx): Provide the caller with both an rtx and a line number. Return true on success. * gensupport.c (process_include, init_md_reader_args_cb): Adjust callers accordingly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86657 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gensupport.c')
-rw-r--r--gcc/gensupport.c34
1 files changed, 6 insertions, 28 deletions
diff --git a/gcc/gensupport.c b/gcc/gensupport.c
index 618e1a271a5..8767068f223 100644
--- a/gcc/gensupport.c
+++ b/gcc/gensupport.c
@@ -246,20 +246,8 @@ process_include (rtx desc, int lineno)
read_rtx_lineno = 1;
/* Read the entire file. */
- while (1)
- {
- rtx desc;
- int c;
-
- c = read_skip_spaces (input_file);
- if (c == EOF)
- break;
-
- ungetc (c, input_file);
- lineno = read_rtx_lineno;
- desc = read_rtx (input_file);
- process_rtx (desc, lineno);
- }
+ while (read_rtx (input_file, &desc, &lineno))
+ process_rtx (desc, lineno);
/* Do not free pathname. It is attached to the various rtx queue
elements. */
@@ -911,9 +899,10 @@ int
init_md_reader_args_cb (int argc, char **argv, bool (*parse_opt)(const char *))
{
FILE *input_file;
- int i;
+ int i, lineno;
size_t ix;
char *lastsl;
+ rtx desc;
for (i = 1; i < argc; i++)
{
@@ -991,19 +980,8 @@ init_md_reader_args_cb (int argc, char **argv, bool (*parse_opt)(const char *))
sequence_num = 0;
/* Read the entire file. */
- while (1)
- {
- rtx desc;
- int lineno;
- int c = read_skip_spaces (input_file);
- if (c == EOF)
- break;
-
- ungetc (c, input_file);
- lineno = read_rtx_lineno;
- desc = read_rtx (input_file);
- process_rtx (desc, lineno);
- }
+ while (read_rtx (input_file, &desc, &lineno))
+ process_rtx (desc, lineno);
fclose (input_file);
/* Process define_cond_exec patterns. */
OpenPOWER on IntegriCloud