[libcxx-commits] [PATCH] D145117: [libc++] Reintroduce workaround for stdint re-export on Darwin

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Mar 1 13:51:01 PST 2023


ldionne created this revision.
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++.

This had been removed as part of 3a0f88c4c2c4 <https://reviews.llvm.org/rG3a0f88c4c2c4b0e0566a8858504d24a14730cd77>. It turns out that this
did break some code, but we never noticed because it requires including
<stdint.h> (and nothing else), and then using one of the types from
that header. It also requires running with modules enabled in a Standard
no later than C++17.

After the test refactorings in D145116 <https://reviews.llvm.org/D145116>, this bug would be caught
by running a CI job on macOS with modules enabled in C++17 mode
(but surprisingly not with more recent standards). This patch doesn't
add such a job because it is deemed a corner case.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145117

Files:
  libcxx/include/module.modulemap.in


Index: libcxx/include/module.modulemap.in
===================================================================
--- libcxx/include/module.modulemap.in
+++ libcxx/include/module.modulemap.in
@@ -71,6 +71,10 @@
     module stdint_h {
       header "stdint.h"
       export *
+      // FIXME: This module only exists on OS X and for some reason the
+      // wildcard above doesn't export it. Removing this breaks the tests
+      // for C compatibility headers in C++17 mode with modules enabled.
+      export Darwin.C.stdint
     }
     module stdio_h {
       // <stdio.h>'s __need_* macros require textual inclusion.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145117.501658.patch
Type: text/x-patch
Size: 617 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230301/8dd9e9f3/attachment.bin>


More information about the libcxx-commits mailing list