<div dir="ltr">Is that a "this patch is good" or a "please rewrite"?</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 27, 2017 at 1:50 PM, Reid Kleckner via Phabricator <span dir="ltr"><<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">rnk added a comment.<br>
<br>
My understanding is that Windows doesn't allow you to delete a file that has been opened and mapped into any process, even if it has been opened with FILE_SHARE_DELETE. One way to work around this would be to avoid memory mapping files in the SourceManager when using the Rewriter. Then FILE_SHARE_DELETE will do what you want. There should be a parameter to MemoryBuffer::getFile to control this. However, I think it really would be cleaner if we unmapped all of our MemoryBuffers of inputs before overwriting them in place. Keeping those buffers around feels like having dangling references.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D30385" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D30385</a><br>
<br>
<br>
<br>
</blockquote></div><br></div>