[libcxx-commits] [PATCH] D110647: Resolve missing table_size symbol

Muiez Ahmed via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 25 07:28:56 PDT 2021


muiez updated this revision to Diff 381988.
muiez added a comment.

Clang-format


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

https://reviews.llvm.org/D110647

Files:
  libcxx/src/locale.cpp
  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,24 @@
+//===----------------------------------------------------------------------===//
+//
+// 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>
+
+#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/src/locale.cpp
===================================================================
--- libcxx/src/locale.cpp
+++ libcxx/src/locale.cpp
@@ -897,6 +897,8 @@
 
 locale::id ctype<char>::id;
 
+const size_t ctype<char>::table_size;
+
 ctype<char>::ctype(const mask* tab, bool del, size_t refs)
     : locale::facet(refs),
       __tab_(tab),


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110647.381988.patch
Type: text/x-patch
Size: 1346 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211025/d61a8fa8/attachment.bin>


More information about the libcxx-commits mailing list