125174976SSiva Chandra Reddy //===-- Map of C standard error numbers to strings --------------*- C++ -*-===// 225174976SSiva Chandra Reddy // 325174976SSiva Chandra Reddy // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 425174976SSiva Chandra Reddy // See https://llvm.org/LICENSE.txt for license information. 525174976SSiva Chandra Reddy // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 625174976SSiva Chandra Reddy // 725174976SSiva Chandra Reddy //===----------------------------------------------------------------------===// 825174976SSiva Chandra Reddy 9330793c9SNick Desaulniers #ifndef LLVM_LIBC_SRC___SUPPORT_STRINGUTIL_TABLES_STDC_ERRORS_H 10330793c9SNick Desaulniers #define LLVM_LIBC_SRC___SUPPORT_STRINGUTIL_TABLES_STDC_ERRORS_H 1125174976SSiva Chandra Reddy 12*0cdb9789SJob Henandez Lara #include "hdr/errno_macros.h" 1325174976SSiva Chandra Reddy #include "src/__support/StringUtil/message_mapper.h" 145ff3ff33SPetr Hosek #include "src/__support/macros/config.h" 1525174976SSiva Chandra Reddy 165ff3ff33SPetr Hosek namespace LIBC_NAMESPACE_DECL { 1725174976SSiva Chandra Reddy 18f7cee44eSJoseph Huber LIBC_INLINE_VAR constexpr const MsgTable<4> STDC_ERRORS = { 1925174976SSiva Chandra Reddy MsgMapping(0, "Success"), 2025174976SSiva Chandra Reddy MsgMapping(EDOM, "Numerical argument out of domain"), 2125174976SSiva Chandra Reddy MsgMapping(ERANGE, "Numerical result out of range"), 22f7cee44eSJoseph Huber MsgMapping(EILSEQ, "Invalid or incomplete multibyte or wide character"), 2325174976SSiva Chandra Reddy }; 2425174976SSiva Chandra Reddy 25f009f72dSMichael Jones LIBC_INLINE_VAR constexpr const MsgTable<4> STDC_ERRNO_NAMES = { 26f009f72dSMichael Jones MsgMapping(0, "0"), 27f009f72dSMichael Jones MsgMapping(EDOM, "EDOM"), 28f009f72dSMichael Jones MsgMapping(ERANGE, "ERANGE"), 29f009f72dSMichael Jones MsgMapping(EILSEQ, "EILSEQ"), 30f009f72dSMichael Jones }; 31f009f72dSMichael Jones 325ff3ff33SPetr Hosek } // namespace LIBC_NAMESPACE_DECL 3325174976SSiva Chandra Reddy 34330793c9SNick Desaulniers #endif // LLVM_LIBC_SRC___SUPPORT_STRINGUTIL_TABLES_STDC_ERRORS_H 35