Skip to content

[5.7] add default values for SymbolGraphOptions #59081

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

QuietMisdreavus
Copy link
Contributor

Cherry-pick of #59037

Explanation: The IncludeClangDocs field of SymbolGraphOptions is uninitialized when generating symbol graphs during compilation. On Intel, this reads the value as false. However, on ARM (at least ARM macOS), this reads the value as true. This PR adds default values to SymbolGraphOptions, as well as explicitly sets IncludeClangDocs to false when generating symbol graphs during compilation.

Scope: Only has an effect when generating symbol graphs. Should not affect normal compilation.

Bug: rdar://93780666

Risk: Very low. The change sets values that were assumed to have already been set anyway. The values only have an effect when symbol graphs are requested; the only effect during normal compilation is the potential extra assignment when initializing the CompilerInvocation.

Testing: The lit test SymbolGraph/ClangImporter/EmitWhileBuilding.swift has been updated to ensure that Clang symbols do not emit a location field. This field was erroneously being emitted on ARM Macs. Existing automated tests still pass.

@QuietMisdreavus QuietMisdreavus requested a review from a team as a code owner May 25, 2022 20:00
@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please test

@QuietMisdreavus QuietMisdreavus merged commit c7e7e50 into release/5.7 May 26, 2022
@QuietMisdreavus QuietMisdreavus deleted the QuietMisdreavus/5.7/clang-syms-while-building branch May 26, 2022 15: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.

2 participants