mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-28 03:17:08 +03:00
500e6c7cfe
Avoid directly querying `Builder.Type`s in favour of `lowerType` calls in a couple of places. The idea here is to avoid querying state stored in the `Builder` to try and move towards a world where codegen (essentially the logic in `codegen.llvm.FuncGen`) can happen on a separate thread to "linking" (which actually interacts with shared state on `codegen.llvm.Object` and `std.zig.llvm.Builder`). Don't clear the `Builder` state during `emit`; this is clearly incompatible with incremental compilation. With that line of code removed, incremental compilation is actually already somewhat functional with the LLVM backend. Also, don't use `c_uint` for source location state---I have no idea where this came from but it definitely isn't correct.