Skip to content
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

[Parse] Split incremental-extensions #65683

Merged
merged 1 commit into from Sep 12, 2023

Conversation

bnbarham
Copy link
Contributor

@bnbarham bnbarham commented Sep 7, 2023

The preprocessor IncrementalProcessing option was being used to control whether or not to teardown the lexer or run the end of translation unit action. In D127284 this was merged with -fincremental-extensions, which also changes top level parsing.

Split these again so that the former behavior can be achieved without the latter (ie. to allow managing lifetime without also changing parsing).

Resolves rdar://113406310.

The preprocessor `IncrementalProcessing` option was being used to
control whether or not to teardown the lexer or run the end of
translation unit action. In D127284 this was merged with
`-fincremental-extensions`, which also changes top level parsing.

Split these again so that the former behavior can be achieved without
the latter (ie. to allow managing lifetime without also changing
parsing).

Resolves rdar://113406310.
@bnbarham bnbarham requested a review from a team as a code owner September 7, 2023 21:47
@github-actions github-actions bot added the clang:frontend Language frontend issues, e.g. anything involving "Sema" label Sep 7, 2023
@bnbarham
Copy link
Contributor Author

bnbarham commented Sep 7, 2023

Seems Swift wasn't the only project to run into this, eg. #62413 (comment). Any thoughts on cherry-picking this to the release branch as well?

Copy link
Contributor

@cor3ntin cor3ntin left a comment

Choose a reason for hiding this comment

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

Give a few days for other people to look at it, otherwise LGTM

Copy link
Contributor

@vgvassilev vgvassilev left a comment

Choose a reason for hiding this comment

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

LGTM! Maybe we can cherry pick it for the patch release 17.0.1. If that’s a critical patch for swift we can try for the 17.0.0 release.

@bnbarham
Copy link
Contributor Author

bnbarham commented Sep 8, 2023

LGTM! Maybe we can cherry pick it for the patch release 17.0.1. If that’s a critical patch for swift we can try for the 17.0.0 release.

It's in the appropriate branches in our fork, so it's fine for us either way. I suggested it more because of #62413 than anything else.

@bnbarham bnbarham merged commit 4c264c2 into llvm:main Sep 12, 2023
2 checks passed
@bnbarham bnbarham deleted the split-incremental-extensions branch September 12, 2023 00:40
bnbarham added a commit to bnbarham/llvm-project that referenced this pull request Sep 13, 2023
This reverts commit c95a0c9.

llvm#65683 split `-fincremental-extensions` and `IncrementalProcessing`
such that `IncrementalProcessing` can be used to extend the lifetime of
various datastructures without parsing changes. LLDB really should not
be parsing any differently to a regular compile, so switch back to using
just `IncrementalProcessing`.
bnbarham added a commit to bnbarham/llvm-project that referenced this pull request Sep 14, 2023
Re-applies llvm#65683 with a fix to always run
`Actions.ActOnEndOfTranslationUnit` regardless of incremental
processing.
ZijunZhaoCCK pushed a commit to ZijunZhaoCCK/llvm-project that referenced this pull request Sep 19, 2023
The preprocessor `IncrementalProcessing` option was being used to
control whether or not to teardown the lexer or run the end of
translation unit action. In D127284 this was merged with
`-fincremental-extensions`, which also changes top level parsing.

Split these again so that the former behavior can be achieved without
the latter (ie. to allow managing lifetime without also changing
parsing).

Resolves rdar://113406310.
bnbarham added a commit that referenced this pull request Sep 21, 2023
Re-applies #65683 with a fix to always run
`Actions.ActOnEndOfTranslationUnit` regardless of incremental
processing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants