[libc-commits] [PATCH] D151129: [libc] Make ErrnoSetterMatcher ignore matching errno on GPU.

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu May 25 04:18:41 PDT 2023


jhuber6 added a comment.

Applied locally, here's some errors while building,

  In file included from /home/jhuber/Documents/llvm/llvm-project/libc/src/__support/StringUtil/error_to_string.cpp:10:
  In file included from /home/jhuber/Documents/llvm/llvm-project/libc/src/__support/StringUtil/platform_errors.h:15:
  In file included from /home/jhuber/Documents/llvm/llvm-project/libc/src/__support/StringUtil/tables/minimal_platform_errors.h:12:
  /home/jhuber/Documents/llvm/llvm-project/libc/src/__support/StringUtil/tables/stdc_errors.h:22:16: error: use of undeclared identifier 'EILSEQ'
      MsgMapping(EILSEQ, "Invalid or incomplete multibyte or wide character"),
                 ^
  In file included from /home/jhuber/Documents/llvm/llvm-project/libc/src/__support/StringUtil/error_to_string.cpp:10:
  In file included from /home/jhuber/Documents/llvm/llvm-project/libc/src/__support/StringUtil/platform_errors.h:15:
  /home/jhuber/Documents/llvm/llvm-project/libc/src/__support/StringUtil/tables/minimal_platform_errors.h:16:23: error: constexpr variable 'PLATFORM_ERRORS' must be initialized by a constant expression
  inline constexpr auto PLATFORM_ERRORS = STDC_ERRORS;
                        ^                 ~~~~~~~~~~~
  /home/jhuber/Documents/llvm/llvm-project/libc/src/__support/StringUtil/tables/minimal_platform_errors.h:16:41: note: initializer of 'STDC_ERRORS' is unknown
  inline constexpr auto PLATFORM_ERRORS = STDC_ERRORS;
                                          ^
  /home/jhuber/Documents/llvm/llvm-project/libc/src/__support/StringUtil/tables/minimal_platform_errors.h:16:41: note: in call to 'array(STDC_ERRORS)'
  /home/jhuber/Documents/llvm/llvm-project/libc/src/__support/StringUtil/tables/stdc_errors.h:18:36: note: declared here
  inline constexpr const MsgTable<4> STDC_ERRORS = {
                                     ^
  /home/jhuber/Documents/llvm/llvm-project/libc/src/__support/StringUtil/error_to_string.cpp:36:18: error: constexpr variable 'TOTAL_STR_LEN' must be initialized by a constant expression
  constexpr size_t TOTAL_STR_LEN = total_str_len(PLATFORM_ERRORS);
                   ^               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /home/jhuber/Documents/llvm/llvm-project/libc/src/__support/StringUtil/message_mapper.h:35:32: note: initializer of 'PLATFORM_ERRORS' is not a constant expression
    for (size_t i = 0; i < table.size(); ++i) {
                                 ^
  /home/jhuber/Documents/llvm/llvm-project/libc/src/__support/StringUtil/error_to_string.cpp:36:34: note: in call to 'total_str_len(PLATFORM_ERRORS)'
  constexpr size_t TOTAL_STR_LEN = total_str_len(PLATFORM_ERRORS);
                                   ^
  /home/jhuber/Documents/llvm/llvm-project/libc/src/__support/StringUtil/tables/minimal_platform_errors.h:16:23: note: declared here
  inline constexpr auto PLATFORM_ERRORS = STDC_ERRORS;
                        ^
  /home/jhuber/Documents/llvm/llvm-project/libc/src/__support/StringUtil/error_to_string.cpp:44:18: error: constexpr variable 'ERR_ARRAY_SIZE' must be initialized by a constant expression
  constexpr size_t ERR_ARRAY_SIZE = max_key_val(PLATFORM_ERRORS) + 1;
                   ^                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /home/jhuber/Documents/llvm/llvm-project/libc/src/__support/StringUtil/message_mapper.h:44:32: note: initializer of 'PLATFORM_ERRORS' is not a constant expression
    for (size_t i = 0; i < table.size(); ++i) {
                                 ^
  /home/jhuber/Documents/llvm/llvm-project/libc/src/__support/StringUtil/error_to_string.cpp:44:35: note: in call to 'max_key_val(PLATFORM_ERRORS)'
  constexpr size_t ERR_ARRAY_SIZE = max_key_val(PLATFORM_ERRORS) + 1;
                                    ^
  /home/jhuber/Documents/llvm/llvm-project/libc/src/__support/StringUtil/tables/minimal_platform_errors.h:16:23: note: declared here
  inline constexpr auto PLATFORM_ERRORS = STDC_ERRORS;
                        ^
  /home/jhuber/Documents/llvm/llvm-project/libc/src/__support/StringUtil/error_to_string.cpp:46:25: error: non-type template argument is not a constant expression
  constexpr MessageMapper<ERR_ARRAY_SIZE, TOTAL_STR_LEN>
                          ^~~~~~~~~~~~~~
  /home/jhuber/Documents/llvm/llvm-project/libc/src/__support/StringUtil/error_to_string.cpp:46:25: note: initializer of 'ERR_ARRAY_SIZE' is not a constant expression
  /home/jhuber/Documents/llvm/llvm-project/libc/src/__support/StringUtil/error_to_string.cpp:44:18: note: declared here
  constexpr size_t ERR_ARRAY_SIZE = max_key_val(PLATFORM_ERRORS) + 1;
                   ^
  5 errors generated.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151129



More information about the libc-commits mailing list