stage2: LLVM backend: fix decls sometimes not marked alive

Without this they could get incorrectly garbage collected.
This commit is contained in:
Andrew Kelley 2021-10-20 16:42:43 -07:00
parent c8ded2f9c9
commit 8b734380f9

View File

@ -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,