zir-memory-layout: astgen: fill in identifier

This commit is contained in:
jacob gw
2021-03-19 15:07:51 -04:00
committed by Andrew Kelley
parent abdbc11c7e
commit e9810d9e79
3 changed files with 23 additions and 34 deletions

View File

@@ -1124,6 +1124,17 @@ pub const Scope = struct {
});
}
pub fn addDecl(
gz: *GenZir,
tag: zir.Inst.Tag,
decl: *Decl,
) !zir.Inst.Ref {
return gz.add(.{
.tag = tag,
.data = .{ .decl = decl },
});
}
pub fn addNode(
gz: *GenZir,
tag: zir.Inst.Tag,