aboutsummaryrefslogtreecommitdiff
path: root/src/arch/aarch64/Emit.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2024-06-30 03:00:07 +0100
committermlugg <mlugg@mlugg.co.uk>2024-07-04 21:01:41 +0100
commitded5c759f83a4da355a128dd4d7f5e22cbd3cabe (patch)
treeb862bbdf36b892e9c39f472c6759f084c87d64b2 /src/arch/aarch64/Emit.zig
parent089bbd6588d82ccda0646e756006cf5787eadef2 (diff)
downloadzig-ded5c759f83a4da355a128dd4d7f5e22cbd3cabe.tar.gz
zig-ded5c759f83a4da355a128dd4d7f5e22cbd3cabe.zip
Zcu: store `LazySrcLoc` in error messages
This change modifies `Zcu.ErrorMsg` to store a `Zcu.LazySrcLoc` rather than a `Zcu.SrcLoc`. Everything else is dominoes. The reason for this change is incremental compilation. If a failed `AnalUnit` is up-to-date on an update, we want to re-use the old error messages. However, the file containing the error location may have been modified, and `SrcLoc` cannot survive such a modification. `LazySrcLoc` is designed to be correct across incremental updates. Therefore, we defer source location resolution until `Compilation` gathers the compile errors into the `ErrorBundle`.
Diffstat (limited to 'src/arch/aarch64/Emit.zig')
-rw-r--r--src/arch/aarch64/Emit.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/aarch64/Emit.zig b/src/arch/aarch64/Emit.zig
index a783137a54..2588db6adc 100644
--- a/src/arch/aarch64/Emit.zig
+++ b/src/arch/aarch64/Emit.zig
@@ -22,7 +22,7 @@ bin_file: *link.File,
debug_output: DebugInfoOutput,
target: *const std.Target,
err_msg: ?*ErrorMsg = null,
-src_loc: Module.SrcLoc,
+src_loc: Module.LazySrcLoc,
code: *std.ArrayList(u8),
prev_di_line: u32,