[libcxx-commits] [PATCH] D144915: [libc++] Fix modules issues on OS X

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Feb 27 14:00:49 PST 2023


ldionne created this revision.
Herald added a subscriber: mstorsjo.
Herald added a project: All.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

First, fix a collision with the Point type from MacTypes.h, which was
reported on Slack, 2022-07-31: https://cpplang.slack.com/archives/C2X659D1B/p1659284691275889

Second, rename the meta:: namespace to TestMeta::. OSX's "/usr/include/ncurses.h"
defines a `meta` function, and is (for some reason) included in
"<SDK>/usr/include/module.modulemap", so that identifier is
off-limits for us to use in anything that compiles with -fmodules:

  libcxx/test/support/type_algorithms.h:16:11: error: redefinition of 'meta' as different kind of symbol
  namespace meta {
             ^
  <SDK>/usr/include/ncurses.h:603:28: note: previous definition is here
  extern NCURSES_EXPORT(int) meta (WINDOW *,bool);                        /* implemented */
                              ^


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144915

Files:
  libcxx/test/libcxx/type_traits/is_always_bitcastable.compile.pass.cpp
  libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy.pass.cpp
  libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy.segmented.pass.cpp
  libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/equal.pass.cpp
  libcxx/test/std/depr/depr.c.headers/math_h.pass.cpp
  libcxx/test/std/language.support/support.limits/limits/is_specialized.pass.cpp
  libcxx/test/std/numerics/c.math/isfinite.pass.cpp
  libcxx/test/std/numerics/c.math/isinf.pass.cpp
  libcxx/test/std/numerics/c.math/isnan.pass.cpp
  libcxx/test/std/numerics/c.math/isnormal.pass.cpp
  libcxx/test/std/ranges/range.adaptors/range.as.rvalue/begin.pass.cpp
  libcxx/test/std/ranges/range.adaptors/range.as.rvalue/end.pass.cpp
  libcxx/test/std/ranges/range.adaptors/range.filter/iterator/arrow.pass.cpp
  libcxx/test/std/strings/basic.string/string.access/at.pass.cpp
  libcxx/test/support/test.support/type_algorithms.pass.cpp
  libcxx/test/support/test_iterators.h
  libcxx/test/support/type_algorithms.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144915.500904.patch
Type: text/x-patch
Size: 28997 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230227/cc92f1d7/attachment-0001.bin>


More information about the libcxx-commits mailing list