aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authorjacob gw <jacoblevgw@gmail.com>2021-03-19 15:07:51 -0400
committerAndrew Kelley <andrew@ziglang.org>2021-03-19 14:43:08 -0700
commite9810d9e79a1aa327d006c27c5d3098b2d29dfe7 (patch)
tree35634eeb88e5fa09efeebfe62fc5b44abaca596a /src/Module.zig
parentabdbc11c7efb2f83804af64ac2fec10b972cdf2a (diff)
downloadzig-e9810d9e79a1aa327d006c27c5d3098b2d29dfe7.tar.gz
zig-e9810d9e79a1aa327d006c27c5d3098b2d29dfe7.zip
zir-memory-layout: astgen: fill in identifier
Diffstat (limited to 'src/Module.zig')
-rw-r--r--src/Module.zig11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Module.zig b/src/Module.zig
index 9a0134c797..cef594e557 100644
--- a/src/Module.zig
+++ b/src/Module.zig
@@ -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,