Skip to content
Commit 0aa128e2 authored by Reid Kleckner's avatar Reid Kleckner
Browse files

[Frontend] Close open file handles before renaming output files

The placement of the 'delete' call that was removed in the unique_ptr
migration in r234597 was not an accident. The raw_ostream has to be
destroyed before you do the rename on Windows, otherwise you get
ERROR_ACCESS_DENIED. We can still use unique_ptr, we just need to do a
manual reset().

Also, range-for-loop-ify this code.

llvm-svn: 234612
parent d03f9f40
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment