Skip to content

Remove Bogus Macro Assert in LUT Building #42436

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
merged 1 commit into from
Apr 21, 2022

Conversation

CodaFi
Copy link
Contributor

@CodaFi CodaFi commented Apr 19, 2022

This assertion assumes that only visibility directives for builtin
macros find their way here. However, the presence of textual headers
in modules means any macro directive can wind up here since clang will
report that it is currently not building a module.

It's been half a decade since this code did anything useful with
macro directives in textual headers, so just leave things be.

rdar://91768988

This assertion assumes that only visibility directives for builtin-in
macros find their way here. However, the presence of textual headers
in modules means any macro directive can wind up here since clang will
report that it is currently not building a module.

It's been half a decade since this code did anything useful with
macro directives in textual headers, so just leave things be.

rdar://91768988
@CodaFi CodaFi requested a review from beccadax April 19, 2022 00:22
@CodaFi
Copy link
Contributor Author

CodaFi commented Apr 19, 2022

@swift-ci smoke test

Copy link
Contributor

@vsapsai vsapsai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know the code enough to make any claims. And maybe non-VisibilityMacroDirective macros are supposed to be handled somewhere else but that's not happening. But if that's not the case, the assertion that a macro directive must be VisibilityMacroDirective seems too strong.

@@ -1969,12 +1969,6 @@ void importer::addMacrosToLookupTable(SwiftLookupTable &table,

// If we're in a module, we really need moduleMacro to be valid.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment still correct? I don't have enough context, so not 100% sure.

@CodaFi CodaFi merged commit 3306c63 into swiftlang:main Apr 21, 2022
@CodaFi CodaFi deleted the hypertextualism branch April 21, 2022 20:19
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.

3 participants