Files
zig/src
Matthew Lugg 0a246f5e67 compiler: stop LLVM bossing the frontend around
I previously wrote some weird code in the compiler frontend solely
because the LLVM backend has some weird requirements, but the better
solution is to avoid those requirements. This commit does that by
introducing "alignment forward references" to `std.zig.llvm.Builder`.
Much like debug forward references, they allow you to reference an
alignment value which will be populated at a later time (and which can
be updated many times, which is important for incremental compilation).
Then, when we want to reference a type's ABI alignment while the type is
not necessarily resolved (required for `@"align"` attributes on function
parameters and function call arguments), we create a forward reference
and use `link.ConstPool` to populate it when ready.

This allows us to remove from the compiler frontend some extremely
arbitrary calls to `Sema.ensureLayoutResolved`, so that the language
specification is not being built around the particular needs of our
compiler implementation's LLVM code generation backend.
2026-03-10 10:26:13 +00:00
..
2026-02-13 11:30:14 -08:00
2026-03-10 10:26:13 +00:00
2026-03-10 10:26:07 +00:00
2025-10-29 14:25:51 +01:00
2026-02-09 10:47:21 -05:00
2026-03-10 10:26:07 +00:00
2025-08-29 17:14:26 -07:00
2026-02-09 10:47:21 -05:00
2026-03-10 10:26:13 +00:00