Skip to content

[clang][modules] Don't prevent translation of FW_Private includes when explicitly building FW (#70714) #7732

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

jansvoboda11
Copy link

We prevent translating #include <FW/PrivateHeader.h> into an import of FW_Private when compiling the implementation of FW or FW_Private. This is specified via -fmodule-name= on the TU command line (used to be -fmodule-implementation-of).

This logic is supposed to only kick in when imported directly from a TU, but it currently also kicks in when compiling the public FW module explicitly (since it also has -fmodule-name= on the command line).

This patch makes sure this logic only kicks in for the case that used to be -fmodule-implementation-of (for the TU), and not for all -fmodule-name= cases (especially for the explicit compile of a module).

rdar://101051277; related: rdar://37500098&38434694 (cherry picked from commit a3efd89)

…n explicitly building FW (llvm#70714)

We prevent translating `#include <FW/PrivateHeader.h>` into an import of
FW_Private when compiling the implementation of FW or FW_Private. This
is specified via `-fmodule-name=` on the TU command line (used to be
`-fmodule-implementation-of`).

This logic is supposed to only kick in when imported directly from a TU,
but it currently also kicks in when compiling the public FW module
explicitly (since it also has `-fmodule-name=` on the command line).

This patch makes sure this logic only kicks in for the case that used to
be `-fmodule-implementation-of` (for the TU), and not for all
`-fmodule-name=` cases (especially for the explicit compile of a
module).

rdar://101051277; related: rdar://37500098&38434694
(cherry picked from commit a3efd89)
@jansvoboda11
Copy link
Author

@swift-ci please test

@jansvoboda11 jansvoboda11 merged commit 0f671e7 into stable/20230725 Nov 2, 2023
@jansvoboda11 jansvoboda11 deleted the jan_svoboda/20230725-priv-fw-from-pub branch November 2, 2023 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant