[llvm] [Support] Add mapped_file_region::sync(), equivalent to msync (PR #153632)

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 14 15:21:48 PDT 2025


aganea wrote:

> Hmm, the test is failing on Windows. Can you read the file through IO before memory is unmapped?

I think this is because of the `fs::TempFile` is open with a delete disposition (flag on the handle). If you do `File.keep()` that'll remove the "delete on close" flag, then you'll be able to `MemoryBuffer::getFile` afterwards.

https://github.com/llvm/llvm-project/pull/153632


More information about the llvm-commits mailing list