ZIR: emit proper string literals
This commit is contained in:
parent
8980f150e9
commit
5135238f86
@ -1456,6 +1456,21 @@ const EmitZIR = struct {
|
|||||||
.kw_args = .{},
|
.kw_args = .{},
|
||||||
};
|
};
|
||||||
try self.decls.append(self.allocator, &str_inst.base);
|
try self.decls.append(self.allocator, &str_inst.base);
|
||||||
return &str_inst.base;
|
|
||||||
|
const ref_inst = try self.arena.allocator.create(Inst.Ref);
|
||||||
|
ref_inst.* = .{
|
||||||
|
.base = .{
|
||||||
|
.name = try self.autoName(),
|
||||||
|
.src = src,
|
||||||
|
.tag = Inst.Ref.base_tag,
|
||||||
|
},
|
||||||
|
.positionals = .{
|
||||||
|
.operand = &str_inst.base,
|
||||||
|
},
|
||||||
|
.kw_args = .{},
|
||||||
|
};
|
||||||
|
try self.decls.append(self.allocator, &ref_inst.base);
|
||||||
|
|
||||||
|
return &ref_inst.base;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user