[libcxx-commits] [PATCH] D110647: [SystemZ][z/OS] Resolve missing table_size symbol
Muiez Ahmed via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Sep 30 13:35:27 PDT 2021
muiez updated this revision to Diff 376343.
muiez added a comment.
Add test case
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110647/new/
https://reviews.llvm.org/D110647
Files:
libcxx/include/__locale
libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/table_size.pass.cpp
Index: libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/table_size.pass.cpp
===================================================================
--- /dev/null
+++ libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/table_size.pass.cpp
@@ -0,0 +1,27 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <locale>
+
+// template <> class ctype<char>
+
+// UNSUPPORTED: c++03, c++11, c++14
+
+#include <locale>
+#include <cassert>
+
+#include "test_macros.h"
+
+int main(int, char**)
+{
+ typedef std::ctype<char> F;
+ const size_t *G = &F::table_size;
+ assert(*G >= 256);
+
+ return 0;
+}
Index: libcxx/include/__locale
===================================================================
--- libcxx/include/__locale
+++ libcxx/include/__locale
@@ -712,9 +712,9 @@
static locale::id id;
#ifdef _CACHED_RUNES
- static const size_t table_size = _CACHED_RUNES;
+ static _LIBCPP_CONSTEXPR const size_t table_size = _CACHED_RUNES;
#else
- static const size_t table_size = 256; // FIXME: Don't hardcode this.
+ static _LIBCPP_CONSTEXPR const size_t table_size = 256; // FIXME: Don't hardcode this.
#endif
_LIBCPP_INLINE_VISIBILITY const mask* table() const _NOEXCEPT {return __tab_;}
static const mask* classic_table() _NOEXCEPT;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110647.376343.patch
Type: text/x-patch
Size: 1705 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210930/70b47bd2/attachment.bin>
More information about the libcxx-commits
mailing list