aboutsummaryrefslogtreecommitdiff
path: root/src/Zcu/PerThread.zig
diff options
context:
space:
mode:
authorDavid Rubin <daviru007@icloud.com>2024-09-08 21:27:35 -0700
committerMatthew Lugg <mlugg@mlugg.co.uk>2024-09-09 10:05:42 +0100
commit9e6d167bb7878682e99482bfaef12e45376665f9 (patch)
treebb6355f6e1e86948d3909f4e20949c8e1c27bda8 /src/Zcu/PerThread.zig
parent54b668f8a33e8466e4771e12f50069a068244640 (diff)
downloadzig-9e6d167bb7878682e99482bfaef12e45376665f9.tar.gz
zig-9e6d167bb7878682e99482bfaef12e45376665f9.zip
comp: `populateTestFunctions` shouldn't bubble up `AnalysisFail`
`ensureCauAnalyzed` adds the anal_unit to the transitive failures, so we don't need to do anything here. The errors will be handled after this function.
Diffstat (limited to 'src/Zcu/PerThread.zig')
-rw-r--r--src/Zcu/PerThread.zig7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Zcu/PerThread.zig b/src/Zcu/PerThread.zig
index 0a581773e9..17c5413b30 100644
--- a/src/Zcu/PerThread.zig
+++ b/src/Zcu/PerThread.zig
@@ -2429,7 +2429,7 @@ fn processExportsInner(
pub fn populateTestFunctions(
pt: Zcu.PerThread,
main_progress_node: std.Progress.Node,
-) !void {
+) Allocator.Error!void {
const zcu = pt.zcu;
const gpa = zcu.gpa;
const ip = &zcu.intern_pool;
@@ -2454,7 +2454,10 @@ pub fn populateTestFunctions(
zcu.sema_prog_node = std.Progress.Node.none;
}
const cau_index = ip.getNav(nav_index).analysis_owner.unwrap().?;
- try pt.ensureCauAnalyzed(cau_index);
+ pt.ensureCauAnalyzed(cau_index) catch |err| switch (err) {
+ error.AnalysisFail => return,
+ error.OutOfMemory => return error.OutOfMemory,
+ };
}
const test_fns_val = zcu.navValue(nav_index);