Skip to content

[stable/20230725] Revert always ending translation unit #7567

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

Conversation

bnbarham
Copy link

@bnbarham bnbarham commented Oct 4, 2023

Reverts commit 76cfe6c and f247725.

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.

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.
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.
@bnbarham
Copy link
Author

bnbarham commented Oct 4, 2023

@swift-ci please test

@bnbarham
Copy link
Author

bnbarham commented Oct 4, 2023

@swift-ci please test llvm

@bnbarham bnbarham merged commit e7ba20f into swiftlang:stable/20230725 Oct 4, 2023
@bnbarham bnbarham deleted the revert-always-end-translation-unit branch October 4, 2023 17:18
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