Skip to content

Commit

Permalink
[libc++] Reintroduce workaround for stdint re-export on Darwin
Browse files Browse the repository at this point in the history
This had been removed as part of 3a0f88c. 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, 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.

Differential Revision: https://reviews.llvm.org/D145117
  • Loading branch information
ldionne committed Mar 2, 2023
1 parent 9dfb142 commit 25bd6fa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libcxx/include/module.modulemap.in
Expand Up @@ -71,6 +71,10 @@ module std [system] {
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.
Expand Down

0 comments on commit 25bd6fa

Please sign in to comment.