mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
This bug was manifesting for user as a nasty link error because they were calling their application's main entry point as a coerced function, which essentially broke reference tracking for the entire ZCU, causing exported symbols to silently not get exported. I've been a little unsure about how coerced functions should interact with the unit graph before, but the solution is actually really obvious now: they shouldn't! `Sema` is now responsible for unwrapping possibly-coerced functions *before* queuing analysis or marking unit references. This makes the reference graph optimal (there are no redundant edges representing coerced versions of the same function) and simplifies logic elsewhere at the expense of just a few lines in Sema. |
||
|---|---|---|
| .. | ||
| behavior | ||
| c_abi | ||
| c_import | ||
| cases | ||
| incremental | ||
| link | ||
| src | ||
| standalone | ||
| assemble_and_link.zig | ||
| behavior.zig | ||
| c_import.zig | ||
| cases.zig | ||
| compare_output.zig | ||
| compile_errors.zig | ||
| gen_h.zig | ||
| llvm_ir.zig | ||
| llvm_targets.zig | ||
| nvptx.zig | ||
| run_translated_c.zig | ||
| stack_traces.zig | ||
| tests.zig | ||
| translate_c.zig | ||