diff options
| author | Thomas Ives <tom@trives.co.uk> | 2021-11-02 22:43:51 +0000 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-11-10 12:39:47 -0500 |
| commit | 51efd553ae94fbf958974284a2f30091e4e1a2fa (patch) | |
| tree | 84f513a2d2cc57ffd0d1b035dac450d25e35a26c /src/arch | |
| parent | 91c3206b45074821749f52043937bf6ed6d9a105 (diff) | |
| download | zig-51efd553ae94fbf958974284a2f30091e4e1a2fa.tar.gz zig-51efd553ae94fbf958974284a2f30091e4e1a2fa.zip | |
C backend: Improve lowering of Zig types to C types
1. Changed Zig pointers to functions to be typedef'd so then we can
treat them the same as other types.
2. Distinguished between const slices (zig_L prefix) and mut slices
(zig_M prefix).
3. Changed lowering of Zig "const pointers" (e.g. *const u8) to to C
"pointers to const" (e.g. const char *) rather than C "const
pointers" (e.g. char * const)
4. Ensured that all typedefs are "linked" even if the decl doesn't
require any forward declarations
5. Added test that exercises function pointer type rendering
6. Changed .slice_ptr instruction to allocate pointer local rather than
a uintptr_t local
Diffstat (limited to 'src/arch')
0 files changed, 0 insertions, 0 deletions
