aboutsummaryrefslogtreecommitdiff
path: root/src/link.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-12-03 20:35:23 -0800
committerAndrew Kelley <andrew@ziglang.org>2025-01-15 15:11:35 -0800
commit9bf715de74a7d5badeae932afb594b7c6b33afa3 (patch)
tree302e2c5a42d30e379c5bb2e86c24360ea49ab3fb /src/link.zig
parent77accf597d845245847b143e42ec4109c9468480 (diff)
downloadzig-9bf715de74a7d5badeae932afb594b7c6b33afa3.tar.gz
zig-9bf715de74a7d5badeae932afb594b7c6b33afa3.zip
rework error handling in the backends
Diffstat (limited to 'src/link.zig')
-rw-r--r--src/link.zig8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/link.zig b/src/link.zig
index d037ccd97b..22eff87e59 100644
--- a/src/link.zig
+++ b/src/link.zig
@@ -673,7 +673,13 @@ pub const File = struct {
}
}
- pub fn updateContainerType(base: *File, pt: Zcu.PerThread, ty: InternPool.Index) UpdateNavError!void {
+ pub const UpdateContainerTypeError = error{
+ OutOfMemory,
+ /// `Zcu.failed_types` is already populated with the error message.
+ TypeFailureReported,
+ };
+
+ pub fn updateContainerType(base: *File, pt: Zcu.PerThread, ty: InternPool.Index) UpdateContainerTypeError!void {
switch (base.tag) {
else => {},
inline .elf => |tag| {