Skip to content

[lldb] Add test for @objc @implementation #10889

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

Conversation

kastiglione
Copy link

@kastiglione kastiglione commented Jun 23, 2025

Add tests for SE-0436. Depends on swiftlang/swift#81967

@kastiglione kastiglione requested a review from a team as a code owner June 23, 2025 17:31
@kastiglione
Copy link
Author

swiftlang/swift#81967

@swift-ci test

@kastiglione
Copy link
Author

swiftlang/swift#81967

@swift-ci test

@kastiglione
Copy link
Author

swiftlang/swift#81967

@swift-ci test

@@ -0,0 +1,4 @@
SWIFT_SOURCES = main.swift
SWIFT_BRIDGING_HEADER = Gadget.h
SWIFT_PRECOMPILE_BRIDGING_HEADER = NO

Choose a reason for hiding this comment

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

Out of curiosity — why is this needed?
(It basically removes DWARF for the types in the header, so I'm curious if the test depends on the missing debug info)

Copy link
Author

Choose a reason for hiding this comment

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

yes the test depends on the absence of debug info (to emulate system or third party libraries). Is there a better way to do this?

Choose a reason for hiding this comment

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

For the clangimported part, this is probably them most convenient solution. Maybe we could add a comment like

# This hides the debug info, to make sure ObjC metadata is being used to resolve the types.

Copy link

@adrian-prantl adrian-prantl left a comment

Choose a reason for hiding this comment

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

This is great! Could you also test what these fields look like from an Objective-C frame?

@kastiglione
Copy link
Author

@swift-ci test

@kastiglione
Copy link
Author

@swift-ci test macOS

@adrian-prantl adrian-prantl merged commit 562f2c1 into swift/release/6.2 Jul 1, 2025
3 checks passed
@adrian-prantl adrian-prantl deleted the dl/lldb-Add-test-for-objc-implementation branch July 1, 2025 23:51
@kastiglione
Copy link
Author

I realize I forgot to address the comments, I'll do that in a follow up.

kastiglione added a commit that referenced this pull request Jul 2, 2025
* [lldb] Add test for @objc @implementation

* Add test decorators

* Handle x86_64 bools

* Fix test regex
(cherry-picked from commit 562f2c1)
kastiglione added a commit that referenced this pull request Jul 2, 2025
* [lldb] Add test for @objc @implementation

* Add test decorators

* Handle x86_64 bools

* Fix test regex
(cherry-picked from commit 562f2c1)
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