stage1: Fix LLVM C ABI type resolution for small packed structs #10499
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.
See #10431 and #9443 for context. Thus far this has been tested really only on Zig master on Linux x86_64, so I'm kinda relying on CI to highlight any potential breakage on other platforms.
Regarding tests, packed structs weren't tested at all in stage1 C ABI until this point, so I added relevant tests for both small and big packed structs, but C→Zig calls still don't support packed struct arguments so small struct cases wouldn't compile with a link to #1481, so I left them commented out for now. If this isn't right, feel free to change or request changes as you see fit; this is my first time contributing and the first time I've dug through stage1 so I might be off base on this one.
For Github's sake: resolves #10431