Skip to content

[lldb] Implement dynamic type resolution for embedded Swift classes #10204

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 1 commit into from
Mar 10, 2025

Conversation

augusto2112
Copy link

Although embedded Swift doesn't have any metadata, we can leverage the vtable to find out what the dynamic type of a class is. Similarly, embedded Swift only allows class existentials, so we can use the same mechanism to find out the dynamic type of those too.

rdar://136615921

@augusto2112 augusto2112 requested a review from a team as a code owner March 7, 2025 19:03
@augusto2112
Copy link
Author

@swift-ci test

return false;
}
if (!typeref) {
HEALTH_LOG(

Choose a reason for hiding this comment

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

Coming soon: we should to convert this to return llvm::Expected :-)

Although embedded Swift doesn't have any metadata, we can leverage the
vtable to find out what the dynamic type of  a class is. Similarly,
embedded Swift only allows class existentials, so we can use the same
mechanism to find out the dynamic type of those too.

rdar://136615921
@augusto2112
Copy link
Author

@swift-ci test

@augusto2112 augusto2112 merged commit 7f11b15 into swiftlang:stable/20240723 Mar 10, 2025
3 checks passed
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