Skip to content

[stable/20240723] Revert always ending translation unit #9212

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 2 commits into from
Sep 6, 2024

Conversation

bnbarham
Copy link

@bnbarham bnbarham commented Sep 5, 2024

Cherry-picks the reverts from #7567 again, as this issue still isn't fixed.

This reverts commit f247725, which was
a re-application of the original change added back in after "fixing" the
underlying issue. See the next commit (also a revert) for more details.

(cherry picked from commit 2e97520)
This reverts commit 76cfe6c.

Only running `ActOnEndOfTranslationUnit` when
`enableIncrementalProcessing` was false was the only NFC part of
splitting `-fincremental-extensions` and `enableIncrementalProcessing`
again (68090ee). LLDB started failing
after that change with:
```
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cstdlib:127:9: error: declaration of 'calloc' must be imported from module 'Darwin.malloc._malloc' before it is required
```

Reverting that part of the change fixed LLDB and didn't cause any other
test failures, so happy days.

Unfortunately most of what `Sema::ActOnEndOfTranslationUnit` does is
additional diagnostics, which don't make a lot of sense from the Clang
Importer in Swift. So this ends up being a significant regression if eg.
`-warnings-as-errors` is enabled.

Resolves rdar://116194950.

(cherry picked from commit eed23a1)
@bnbarham
Copy link
Author

bnbarham commented Sep 5, 2024

@swift-ci please test

@bnbarham bnbarham merged commit c034db5 into swiftlang:stable/20240723 Sep 6, 2024
0 of 3 checks passed
@bnbarham bnbarham deleted the revert-end-tu-again branch September 6, 2024 00:41
bnbarham added a commit that referenced this pull request May 21, 2025
AnthonyLatsis added a commit that referenced this pull request Jun 26, 2025
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