summaryrefslogtreecommitdiff
path: root/gas/as.c
diff options
context:
space:
mode:
authorSterling Augustine <sterling@tensilica.com>2010-06-21 23:56:33 +0000
committerSterling Augustine <sterling@tensilica.com>2010-06-21 23:56:33 +0000
commitcfd3dacb4e5bc76644fa5005866b6e59fdb26aea (patch)
tree9741f66c49ce56d4bf3a5af50506d7cf3a78916e /gas/as.c
parent21ded97e6b029fa079e3f88406f637b32de020c7 (diff)
downloadbinutils-redhat-cfd3dacb4e5bc76644fa5005866b6e59fdb26aea.tar.gz
2010-06-21 Sterling Augustine <sterling@tensilica.com>
PR gas/11728 * as.c: Globalize keep_it. (main): Remove keep_it. Move conditional from here... (close_output_file): ...to here.
Diffstat (limited to 'gas/as.c')
-rw-r--r--gas/as.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gas/as.c b/gas/as.c
index fd74cb147d..d617b3398d 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -98,6 +98,9 @@ int debug_memory = 0;
/* Enable verbose mode. */
int verbose = 0;
+/* Keep the output file. */
+int keep_it = 0;
+
segT reg_section;
segT expr_section;
segT text_section;
@@ -953,6 +956,8 @@ static void
close_output_file (void)
{
output_file_close (out_file_name);
+ if (!keep_it)
+ unlink_if_ordinary (out_file_name);
}
/* The interface between the macro code and gas expression handling. */
@@ -1082,7 +1087,6 @@ main (int argc, char ** argv)
char ** argv_orig = argv;
int macro_strip_at;
- int keep_it;
start_time = get_run_time ();
@@ -1245,9 +1249,6 @@ main (int argc, char ** argv)
if (had_errors () > 0 && ! flag_always_generate_output)
keep_it = 0;
- if (!keep_it)
- unlink_if_ordinary (out_file_name);
-
input_scrub_end ();
END_PROGRESS (myname);