[llvm] [Support] Always call FlushFileBuffers() when unmapping memory on Windows (PR #78597)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 18 07:16:31 PST 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 08e4386a2c91befabab317498b50ffc326ff4eae 76f6dbe8b78214bf54ac7481970f4c28f417ed7f -- llvm/lib/Support/Windows/Path.inc
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Support/Windows/Path.inc b/llvm/lib/Support/Windows/Path.inc
index 204dc41297..7559de26bc 100644
--- a/llvm/lib/Support/Windows/Path.inc
+++ b/llvm/lib/Support/Windows/Path.inc
@@ -950,9 +950,10 @@ void mapped_file_region::unmapImpl() {
       // after, under high I/O pressure.
       //
       // Separately, on VirtualBox Shared Folder mounts, writes via memory maps
-      // always end up unflushed (regardless of version of Windows, unless flushed
-      // with this explicit call, if they are renamed with
-      // SetFileInformationByHandle(FileRenameInfo) before closing the output handle.
+      // always end up unflushed (regardless of version of Windows, unless
+      // flushed with this explicit call, if they are renamed with
+      // SetFileInformationByHandle(FileRenameInfo) before closing the output
+      // handle.
       ::FlushFileBuffers(FileHandle);
     }
 

``````````

</details>


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


More information about the llvm-commits mailing list