Enums from macro definitions for ios sdk #7565
Open
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 is the enums for an iOS generated from macro definitions from
iOS18.6.sdk, collected automatically via clang python api + names for them generated via lowtier LLM (as i has no access to the frontier LLMs atm) and partially analysed and brushed manually (only collisions within a single file resolved + few splits/merges done by hand).I don't know if i will complete this, as i've brushed ~50 files and bored as hell of this routine, however i hope it may help you.
current todos:
* as the macros gathered automatically, main heuristic for their relation is continuity of the definitions + i've added some dumb heuristics for the common prefixes and ascending values, however macros sometimes isn't defined continuously but blasted within the file, so to increase the quality of the generated types it should be verified by hand
IMPORTANT NOTICE: some of the macro values may be incorrect because of multiple reasons:
netinet6/in6.his considered to be used as part ofnetinet/in.h, soIPV6PROTO_MAXIDis defined referencingIPPROTO_PIMmacro fromnetinet/in.herr_sub_hypervisorfromarm64/hv/hv_kern_types.hit defined aserr_sub(0xba5), in my current implementation of crawler when trying to evaluate this expressionerr_subis removed, thus only(0xba5)is left, which is incorrect