-
Notifications
You must be signed in to change notification settings - Fork 10.5k
RemoteInspection: Handle ObjC typerefs in computeUnalignedFieldStartOffset #76678
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
kastiglione
merged 2 commits into
main
from
dl/main/RemoteInspection-Handle-ObjC-typerefs-in-computeUnalignedFieldStartOffset
Sep 27, 2024
Merged
RemoteInspection: Handle ObjC typerefs in computeUnalignedFieldStartOffset #76678
kastiglione
merged 2 commits into
main
from
dl/main/RemoteInspection-Handle-ObjC-typerefs-in-computeUnalignedFieldStartOffset
Sep 27, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
augusto2112
reviewed
Sep 24, 2024
@swift-ci smoke test |
augusto2112
approved these changes
Sep 26, 2024
@swift-ci smoke test macOS |
kastiglione
added a commit
to swiftlang/llvm-project
that referenced
this pull request
Sep 27, 2024
Extend `LLDBTypeInfoProvider` to support ObjC class names (such as "NSObject", "NSView") in addition to mangled Swift names. This is to support `ObjCClassTypeRefs`, which contain the class name, but not the mangled name. Note that `ObjCClassTypeRefs` are typerefs for classes in the ObjC (`__C`) module. Depends on swiftlang/swift#76678
adrian-prantl
pushed a commit
to adrian-prantl/llvm-project
that referenced
this pull request
Sep 27, 2024
Extend `LLDBTypeInfoProvider` to support ObjC class names (such as "NSObject", "NSView") in addition to mangled Swift names. This is to support `ObjCClassTypeRefs`, which contain the class name, but not the mangled name. Note that `ObjCClassTypeRefs` are typerefs for classes in the ObjC (`__C`) module. Depends on swiftlang/swift#76678 (cherry picked from commit 4a1abae)
kastiglione
added a commit
to swiftlang/llvm-project
that referenced
this pull request
Sep 30, 2024
Extend `LLDBTypeInfoProvider` to support ObjC class names (such as "NSObject", "NSView") in addition to mangled Swift names. This is to support `ObjCClassTypeRefs`, which contain the class name, but not the mangled name. Note that `ObjCClassTypeRefs` are typerefs for classes in the ObjC (`__C`) module. Depends on swiftlang/swift#76678 (cherry picked from commit 4a1abae)
kastiglione
added a commit
to swiftlang/llvm-project
that referenced
this pull request
Sep 30, 2024
Extend `LLDBTypeInfoProvider` to support ObjC class names (such as "NSObject", "NSView") in addition to mangled Swift names. This is to support `ObjCClassTypeRefs`, which contain the class name, but not the mangled name. Note that `ObjCClassTypeRefs` are typerefs for classes in the ObjC (`__C`) module. Depends on swiftlang/swift#76678 (cherry picked from commit 4a1abae)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change is part of a fix for a regression that wasn't noticed because lldb has a fallback to using ASTContexts when type metadata resolution fails.
For any Swift class that directly or indirectly inherits from an ObjC class (such as
NSObject
,NSView
, etc), the functioncomputeUnalignedFieldStartOffset
will fail to compute the start offset. To compute the start offset, it traverses the parent classes and uses their sizes. Once the traversal reaches an ObjC class, the RemoteInspection does not know the size. The fix here is to get the size from theTypeInfo
returned by the externalTypeInfoProvider
(which in LLDB isLLDBTypeInforProvider
).Depended on by swiftlang/llvm-project#9320