[libc-commits] [PATCH] D147967: [libc] move strerror and strsignal to OS msg maps

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Apr 18 15:59:07 PDT 2023


sivachandra accepted this revision.
sivachandra added inline comments.
This revision is now accepted and ready to land.


================
Comment at: libc/src/__support/StringUtil/CMakeLists.txt:11
+# The table maps depend on message_mapper.
+add_subdirectory(TableMappings)
+
----------------
We are moving to giving directories also lower case names. So, may be just `tables` for the nested directory?


================
Comment at: libc/src/__support/StringUtil/TableMappings/error_table.h:26
+#else
+constexpr auto PLATFORM_ERRORS = STDC_ERRORS + POSIX_ERRORS;
+#endif
----------------
Lets not add `POSIX_ERRORS` for the default case.


================
Comment at: libc/src/__support/StringUtil/TableMappings/linux/error_table.h:19
+
+constexpr MsgTable<52> LINUX_ERRORS = {
+    MsgMapping(ENOTBLK, "Block device required"),
----------------
`constexpr` tables declared in header files should be `inline constexpr ...`.


================
Comment at: libc/src/__support/StringUtil/error_to_string.cpp:33
+// constexpr auto total_arr = cstd_err_concat + posix_err_arr;
+// #endif
+
----------------
Remove?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147967/new/

https://reviews.llvm.org/D147967



More information about the libc-commits mailing list