[SharedCache] Fix detection of the class name of categories#6553
Closed
bdash wants to merge 1 commit into
Closed
Conversation
The logic for determining the class name of a category did not correctly handle classes defined in other images in the shared cache. There were two problems: 1. If the class is defined in another image that is already loaded, `ObjCProcessor` has already renamed the symbol from `_OBJC_CLASS_$_` to `cls_`. Both forms of symbol name are now handled. 2. If the class is defined in an image that is not yet loaded, no symbol name is available. The category's class is now looked up in the shared cache symbol table, and the symbol's name is parsed as if it were an import symbol. This fixes almost all cases of "Failed to determine base classname for category" that I have come across.
Member
|
Would something like this be ok with you? fb1d9e1 Nothing functionally changes I just think that is easier to understand from the base classes perspective, to always call If you are fine with that change I will fix it up into your commit with you being the author, or i can leave it separate, ill leave that up to you. |
Contributor
Author
|
I wasn't happy with the naming / factoring of |
Member
|
Cherry-picked onto dev with 254fd7b Will be on dev build |
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
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.
The logic for determining the class name of a category did not correctly handle classes defined in other images in the shared cache. There were two problems:
ObjCProcessorhas already renamed the symbol from_OBJC_CLASS_$_tocls_. Both forms of symbol name are now handled.This fixes all cases of "Failed to determine base classname for category" that I have come across.