aboutsummaryrefslogtreecommitdiff
path: root/src/Type.zig
diff options
context:
space:
mode:
authorMatthew Lugg <mlugg@mlugg.co.uk>2025-02-05 12:17:13 +0000
committerGitHub <noreply@github.com>2025-02-05 12:17:13 +0000
commitf01f1e33c96f0b00db8e036a654c1b3bf8531cd8 (patch)
tree3daca71f83a02d73d4c93d973d7022776e476274 /src/Type.zig
parentcf059ee08716300e924bced08ebdd5bd8f97d789 (diff)
parentbebfa036ba52076cd03f9ef943f61da64ba6e97b (diff)
downloadzig-f01f1e33c96f0b00db8e036a654c1b3bf8531cd8.tar.gz
zig-f01f1e33c96f0b00db8e036a654c1b3bf8531cd8.zip
Merge pull request #22754 from mlugg/files-and-stuff
ZON and incremental bits
Diffstat (limited to 'src/Type.zig')
-rw-r--r--src/Type.zig7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Type.zig b/src/Type.zig
index 0fd6e184d8..690cc3fea0 100644
--- a/src/Type.zig
+++ b/src/Type.zig
@@ -3587,8 +3587,7 @@ pub fn typeDeclSrcLine(ty: Type, zcu: *Zcu) ?u32 {
};
const info = tracked.resolveFull(&zcu.intern_pool) orelse return null;
const file = zcu.fileByIndex(info.file);
- assert(file.zir_loaded);
- const zir = file.zir;
+ const zir = file.zir.?;
const inst = zir.instructions.get(@intFromEnum(info.inst));
return switch (inst.tag) {
.struct_init, .struct_init_ref => zir.extraData(Zir.Inst.StructInit, inst.data.pl_node.payload_index).data.abs_line,
@@ -3905,7 +3904,7 @@ fn resolveStructInner(
var comptime_err_ret_trace = std.ArrayList(Zcu.LazySrcLoc).init(gpa);
defer comptime_err_ret_trace.deinit();
- const zir = zcu.namespacePtr(struct_obj.namespace).fileScope(zcu).zir;
+ const zir = zcu.namespacePtr(struct_obj.namespace).fileScope(zcu).zir.?;
var sema: Sema = .{
.pt = pt,
.gpa = gpa,
@@ -3959,7 +3958,7 @@ fn resolveUnionInner(
var comptime_err_ret_trace = std.ArrayList(Zcu.LazySrcLoc).init(gpa);
defer comptime_err_ret_trace.deinit();
- const zir = zcu.namespacePtr(union_obj.namespace).fileScope(zcu).zir;
+ const zir = zcu.namespacePtr(union_obj.namespace).fileScope(zcu).zir.?;
var sema: Sema = .{
.pt = pt,
.gpa = gpa,