aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
Diffstat (limited to 'gas')
-rw-r--r--gas/as.h4
-rw-r--r--gas/config/tc-mips.c2
-rw-r--r--gas/input-scrub.c25
3 files changed, 13 insertions, 18 deletions
diff --git a/gas/as.h b/gas/as.h
index ff5b9a4..135abc8 100644
--- a/gas/as.h
+++ b/gas/as.h
@@ -473,8 +473,8 @@ void do_scrub_begin (int);
void input_scrub_begin (void);
void input_scrub_close (void);
void input_scrub_end (void);
-int new_logical_line (const char *, int);
-int new_logical_line_flags (const char *, int, int);
+void new_logical_line (const char *, int);
+void new_logical_line_flags (const char *, int, int);
void subsegs_begin (void);
void subseg_change (segT, int);
segT subseg_new (const char *, subsegT);
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index ae7a443..9b895a6 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -19737,7 +19737,7 @@ s_mips_file (int x ATTRIBUTE_UNUSED)
after 3.1 in order to support DWARF-2 on MIPS. */
if (filename != NULL && ! first_file_directive)
{
- (void) new_logical_line (filename, -1);
+ new_logical_line (filename, -1);
s_file_string (filename);
}
first_file_directive = 1;
diff --git a/gas/input-scrub.c b/gas/input-scrub.c
index 47382e3..f65cd79 100644
--- a/gas/input-scrub.c
+++ b/gas/input-scrub.c
@@ -450,7 +450,7 @@ bump_line_counters (void)
bit 3 of flags is set.
Returns nonzero if the filename actually changes. */
-int
+void
new_logical_line_flags (const char *fname, /* DON'T destroy it! We point to it! */
int line_number,
int flags)
@@ -473,7 +473,7 @@ new_logical_line_flags (const char *fname, /* DON'T destroy it! We point to it!
/* PR gas/16908 workaround: Ignore updates when nested inside a macro
expansion. */
if (from_sb_expansion == expanding_nested)
- return 0;
+ return;
if (next_saved_file->logical_input_file)
fname = next_saved_file->logical_input_file;
else
@@ -492,30 +492,25 @@ new_logical_line_flags (const char *fname, /* DON'T destroy it! We point to it!
fname = NULL;
}
+ if (fname
+ && (logical_input_file == NULL
+ || filename_cmp (logical_input_file, fname)))
+ logical_input_file = fname;
+
/* When encountering file or line changes inside a macro, arrange for
bump_line_counters() to henceforth increment the logical line number
again, just like it does when expanding repeats. See as_where() for
why changing file or line alone doesn't alter expansion mode. */
if (from_sb_expansion == expanding_macro
- && (logical_input_file != NULL || fname != NULL)
+ && logical_input_file != NULL
&& logical_input_line != -1u)
from_sb_expansion = expanding_repeat;
-
- if (fname
- && (logical_input_file == NULL
- || filename_cmp (logical_input_file, fname)))
- {
- logical_input_file = fname;
- return 1;
- }
- else
- return 0;
}
-int
+void
new_logical_line (const char *fname, int line_number)
{
- return new_logical_line_flags (fname, line_number, 0);
+ new_logical_line_flags (fname, line_number, 0);
}