Skip to content

Revert "[ASTImporter] Fields are imported first and reordered for correct layout" #7921

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

Michael137
Copy link

@Michael137 Michael137 commented Dec 27, 2023

This reverts commit e953669.

Prior to this patch, the import re-ordering only applied to RecordDecl. This patch changed the decls() we were iterating over from a RecordDecl to those of the DeclContext, which meant we were now also doing this re-ordering for members of ObjCInterfaceDecls. This caused crashes when debugging Objective-C applications with LLDB.

For Objective-C interfaces this re-ordering doesn't actually make sense because those don't have function bodies, so there's no risk of importing a method body that references a yet-to-be-imported ivar, which is what D154764 attempted to fix.

Revert for now until we find a way to support ObjCInterfaceDecls properly.

rdar://119343184
rdar://119636274
rdar://119832131

…rect layout"

This reverts commit e953669.

Prior to this patch, the re-ordering only applied to `RecordDecl`.
This patch changed the decls we were iterating from `RecordDecl` to
`DeclContext`, which meant we were now also doing this re-ordering
for members of `ObjCInterfaceDecl`s. This caused crashes when debugging
Objective-C applications with LLDB.

Revert for now until we find a way to support `ObjCInterfaceDecl`s
properly.

rdar://119343184
rdar://119636274
rdar://119832131
@Michael137
Copy link
Author

@swift-ci test

@Michael137 Michael137 merged commit 7bb9009 into swiftlang:stable/20230725 Jan 2, 2024
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