rnk added a comment.

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.


https://reviews.llvm.org/D30385



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to