Skip to content

[lldb] Restore upstream implementation of ClangPersistentVariables::RemovePersistentVariable #7514

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

kastiglione
Copy link

@kastiglione kastiglione commented Sep 22, 2023

Change ClangPersistentVariables::RemovePersistentVariable to use the implementation of upstream lldb.

For reasons unknown to me, this version of ClangPersistentVariables has been supporting Swift-specific persistent variable names, such as $R1 or $E1. As far as I know, this support isn't needed on the Clang side. Such variables are already supported on the Swift side, see SwiftPersistentExpressionState.

rdar://115829246

@kastiglione
Copy link
Author

@swift-ci test

@kastiglione
Copy link
Author

@swift-ci test

@kastiglione
Copy link
Author

@jimingham any reason why this clang specific version would end up with Swift support in it, and diverge from upstream? Was it unintentional, or intentional for an as yet unknown reason to me?

@kastiglione
Copy link
Author

@swift-ci test macOS

@jimingham
Copy link

I don't remember why this code is where it is.
For this to be relevant, a clang expression would have to be able to produce a swift object. If you call a swift function that is bridged to ObjC is there a chance that could return a swift result or error which, since we see dynamically is a Swift language runtime object we would give the swift result/error name to? I'm not up on how the Swift->ObjC interop works these days...

@kastiglione
Copy link
Author

Note that m_next_persistent_error_id is never incremented, which leads me to think that the answer to your question is no. I will check on whether there's a way for a bridged objc function to be bridged as throws.

@kastiglione kastiglione force-pushed the dl/lldb-Restore-upstream-implementation-of-ClangPersistentVariables-RemovePersistentVariable branch from 8273b93 to 6c93933 Compare April 23, 2024 22:13
@kastiglione kastiglione changed the base branch from stable/20230725 to swift/release/6.0 April 23, 2024 22:14
@kastiglione
Copy link
Author

@swift-ci test

@kastiglione
Copy link
Author

If you call a swift function that is bridged to ObjC is there a chance that could return a swift result or error which, since we see dynamically is a Swift language runtime object we would give the swift result/error name to?

I was unable to make this happen.

@kastiglione
Copy link
Author

@swift-ci test windows

@kastiglione
Copy link
Author

@adrian-prantl would you mind merging this?

@adrian-prantl adrian-prantl merged commit ab4e7ae into swift/release/6.0 Apr 25, 2024
@kastiglione kastiglione deleted the dl/lldb-Restore-upstream-implementation-of-ClangPersistentVariables-RemovePersistentVariable branch May 15, 2024 19:04
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.

4 participants