diff options
Diffstat (limited to 'driver/Driveraux.ml')
-rw-r--r-- | driver/Driveraux.ml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/driver/Driveraux.ml b/driver/Driveraux.ml index 2c478fb1..6d8d0adc 100644 --- a/driver/Driveraux.ml +++ b/driver/Driveraux.ml @@ -18,6 +18,11 @@ open Clflags let safe_remove file = try Sys.remove file with Sys_error _ -> () +let tmp_file suff = + let tmpfile = Filename.temp_file "compcert" suff in + at_exit (fun () -> safe_remove tmpfile); + tmpfile + (* Invocation of external tools *) let rec waitpid_no_intr pid = |