This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Do not remove existing output file.
ClosedPublic

Authored by ruiu on Feb 23 2018, 10:56 PM.

Details

Summary

FileOutputBuffer automatically removes an existing file, so we don't
need to do that. Actually doing that is discouraged because when the
linker fails to create an output for some reason after instantiating
FileOutputBufffer, FileOutputBuffer removes a temporary file and don't
touch an existing file. That's an desired behavior from the user's
point of view.

(Internally, FileOutputBuffer writes its contents to a temporary file
and then rename it over to an existing file on commit()).

Event Timeline

ruiu created this revision.Feb 23 2018, 10:56 PM
sbc100 accepted this revision.Feb 27 2018, 11:41 AM
This revision is now accepted and ready to land.Feb 27 2018, 11:41 AM
This revision was automatically updated to reflect the committed changes.