This is an archive of the discontinued LLVM Phabricator instance.

[Support] Add more Windows error codes to mapWindowsError
ClosedPublic

Authored by mstorsjo on Oct 15 2021, 3:57 AM.

Details

Summary

Also sort ERROR_BAD_NETPATH correctly.

Compared with the similar error code mapping in
libcxx/src/filesystem/operations.cpp, I'm leaving out
mappings for ERROR_NOT_SAME_DEVICE and ERROR_OPERATION_ABORTED.
They map nicely to std::errc::cross_device_link and
std::errc::operation_canceled, but those aren't available in
llvm::errc, as they aren't available across all platforms.

Also, the libcxx version maps ERROR_INVALID_NAME to
no_such_file_or_directory instead of invalid_argument.

Diff Detail

Event Timeline

mstorsjo created this revision.Oct 15 2021, 3:57 AM
mstorsjo requested review of this revision.Oct 15 2021, 3:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 15 2021, 3:57 AM
This revision is now accepted and ready to land.Oct 15 2021, 4:04 PM