aboutsummaryrefslogtreecommitdiffstats
path: root/driver/Driveraux.mli
diff options
context:
space:
mode:
authorBernhard Schommer <bschommer@users.noreply.github.com>2018-01-03 16:26:14 +0100
committerXavier Leroy <xavierleroy@users.noreply.github.com>2018-01-03 16:26:14 +0100
commitca9219d447c37038063f3d297c8f8195bb23e2f1 (patch)
treee67aee7fa6cea3cbfc242818fd2637e072ce2c02 /driver/Driveraux.mli
parent87558f62b29ee94392c3955434aa2680aaaeffa5 (diff)
downloadcompcert-kvx-ca9219d447c37038063f3d297c8f8195bb23e2f1.tar.gz
compcert-kvx-ca9219d447c37038063f3d297c8f8195bb23e2f1.zip
Remove all temporary files at program exit (#46)
Replaced calls to Filename.temp_file by own version Driveraux.tmp_file. The Driveraux.tmp_file function takes care that the temporary files are removed at exit. Consequently there is no need to explicitly remove temp files in Driver.
Diffstat (limited to 'driver/Driveraux.mli')
-rw-r--r--driver/Driveraux.mli5
1 files changed, 5 insertions, 0 deletions
diff --git a/driver/Driveraux.mli b/driver/Driveraux.mli
index 274ecedd..51333b2a 100644
--- a/driver/Driveraux.mli
+++ b/driver/Driveraux.mli
@@ -22,6 +22,11 @@ val command_error: string -> int -> unit
val safe_remove: string -> unit
(** Remove the given file if it exists *)
+val tmp_file: string -> string
+ (** Create a temporary file with the given suffix.
+ The file will be removed when the program exits.
+ Return the absolute path to the file. *)
+
val output_filename: ?final:bool -> string -> string -> string -> string
(** Determine names for output files. We use -o option if specified
and if this is the final destination file (not a dump file).