[llvm] [Support] Handle delete_pending case for Windows fs::status (PR #90655)

Jeremy Day via llvm-commits llvm-commits at lists.llvm.org
Wed May 1 15:23:03 PDT 2024


================
@@ -38,6 +38,10 @@ enum class errc {
   bad_address = int(std::errc::bad_address),
   bad_file_descriptor = int(std::errc::bad_file_descriptor),
   broken_pipe = int(std::errc::broken_pipe),
+  // There is no delete_pending in std::errc; this error code is negative to
+  // avoid conflicts. This error roughly corresponds with Windows'
+  // STATUS_DELETE_PENDING 0xC0000056.
+  delete_pending = -56,
----------------
z2oh wrote:

This seems a bit unorthodox, but I'm not sure how else one might extend the error domain. Alternatively, there's a `std::errc::operation_in_progress` that might be reasonableto use instead.

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


More information about the llvm-commits mailing list