diff options
| author | Isaac Freund <ifreund@ifreund.xyz> | 2021-03-23 11:58:43 +0100 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2021-03-23 11:58:43 +0100 |
| commit | 668148549a822c7fa680cf08999dd845bde765aa (patch) | |
| tree | d7d08e3c4d78e2f74b1ce7525a1990d52e2e7c8f /src/Module.zig | |
| parent | f3e8073e054c3bcf6fc8dd07cb164658da229b0a (diff) | |
| download | zig-668148549a822c7fa680cf08999dd845bde765aa.tar.gz zig-668148549a822c7fa680cf08999dd845bde765aa.zip | |
stage2: fix two return types to be Ref not Index
We currently have no type safety between zir.Inst.Ref, zir.Inst.Index,
and plain u32s.
Diffstat (limited to 'src/Module.zig')
| -rw-r--r-- | src/Module.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Module.zig b/src/Module.zig index 33422ae011..e0695437b8 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -1011,7 +1011,7 @@ pub const Scope = struct { param_types: []const zir.Inst.Ref, ret_ty: zir.Inst.Ref, cc: zir.Inst.Ref, - }) !zir.Inst.Index { + }) !zir.Inst.Ref { assert(args.ret_ty != 0); assert(args.cc != 0); const gpa = gz.zir_code.gpa; @@ -1075,7 +1075,7 @@ pub const Scope = struct { args: []const zir.Inst.Ref, /// Absolute node index. This function does the conversion to offset from Decl. abs_node_index: ast.Node.Index, - ) !zir.Inst.Index { + ) !zir.Inst.Ref { assert(callee != 0); assert(abs_node_index != 0); const gpa = gz.zir_code.gpa; |
