[all-commits] [llvm/llvm-project] f56dfb: [libc++] Fix modules issues on OS X

Quuxplusone via All-commits all-commits at lists.llvm.org
Wed Mar 1 07:33:57 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f56dfb78aa3fcc96bf7e5b6c3bdff8fa620aefd1
      https://github.com/llvm/llvm-project/commit/f56dfb78aa3fcc96bf7e5b6c3bdff8fa620aefd1
  Author: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
  Date:   2023-03-01 (Wed, 01 Mar 2023)

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

  Log Message:
  -----------
  [libc++] Fix modules issues on OS X

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 types::. 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 */
                                ^

Finally, add a CI configuration for modules on OS X to make sure it
does not regress.

Differential Revision: https://reviews.llvm.org/D144915




More information about the All-commits mailing list