mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
stage2: LLVM backend: fix decls sometimes not marked alive
Without this they could get incorrectly garbage collected.
This commit is contained in:
parent
c8ded2f9c9
commit
8b734380f9
@ -1383,6 +1383,7 @@ pub const DeclGen = struct {
|
||||
ptr_val: Value,
|
||||
decl: *Module.Decl,
|
||||
) Error!ParentPtr {
|
||||
decl.alive = true;
|
||||
var ptr_ty_payload: Type.Payload.ElemType = .{
|
||||
.base = .{ .tag = .single_mut_pointer },
|
||||
.data = decl.ty,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user