igorkudrin wrote:

> I don't see any relevant changes on those files, so I don't know the where 
> `openNativeFileInternal()` comes into the picture.

`getFileAux()`  calls `openNativeFileForRead()` first and then passes the file 
descriptor to `getOpenFileImpl()`. `openNativeFileForRead()` eventually calls 
`openNativeFileInternal()`, which passes `FILE_SHARE_DELETE` to 
`::CreateFileW()`, and that was already like that in times of 
[D76806](https://reviews.llvm.org/D76806) `Remove m_last_file_sp from 
SourceManager`, so I don't know why the opened file was locked for deletion 
back then.

The only change in the sequence I can see was replacing `WritableMemoryBuffer` 
with `MemoryBuffer`, caused by [D122856](https://reviews.llvm.org/D122856), 
`[lldb] Refactor DataBuffer so we can map files as read-only`, but the file was 
still opened with the `FILE_SHARE_DELETE` mode.


https://github.com/llvm/llvm-project/pull/111237
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to