[ObjC] Parse sections containing Objective-C constants #6559
+294
−4
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 adds support for the
__objc_arrayobj
,_objc_dictobj
,__objc_intobj
,__objc_floatobj
,__objc_doubleobj
and__objc_dateobj
sections that contain Objective-C constants. These are emitted by Apple's versions of Clang forconst
literals, amongst other things.There are a few points here where I'm not sure what the best approach is:
CFString
, but if it stays like that the setting description will need to be updated.SymbolQueue
and share it between all of these functions rather than having each create its own?BeginUndoActions
/ForgetUndoActions
dance? I copied it fromProcessCFStrings
. IIRC that's problematic for performance due to needing to synchronize with the main thread, and doesn't make a lot of sense for background work like this.SymbolQueue
would simplify things slightly.SymbolQueue
is a member variable that's a raw pointer and will leak if an exception is thrown. An exception afterBeginBulkModifySymbols
is called will leave that in an unbalanced state. These are issues are all carried over fromProcessCFString
.A couple of libraries that are good for testing with in the macOS shared cache: