aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-04-30 14:36:02 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-04-30 14:36:02 -0700
commitdb7acd83d2fb18fc0fbd1b58e0638f2afaa595fb (patch)
treeb729267999627a662f2e3cc3e4bbfc4356ca48b2 /src/Module.zig
parentfb95fd84431e399d79266d5c9c4acd8ea124399a (diff)
downloadzig-db7acd83d2fb18fc0fbd1b58e0638f2afaa595fb.tar.gz
zig-db7acd83d2fb18fc0fbd1b58e0638f2afaa595fb.zip
Sema: implement function declarations
Diffstat (limited to 'src/Module.zig')
-rw-r--r--src/Module.zig5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Module.zig b/src/Module.zig
index f0810d00a5..b4c7a94c3a 100644
--- a/src/Module.zig
+++ b/src/Module.zig
@@ -565,6 +565,11 @@ pub const EnumFull = struct {
/// the `Decl` only, with a `Value` tag of `extern_fn`.
pub const Fn = struct {
owner_decl: *Decl,
+ /// The ZIR instruction that is a function instruction. Use this to find
+ /// the body. We store this rather than the body directly so that when ZIR
+ /// is regenerated on update(), we can map this to the new corresponding
+ /// ZIR instruction.
+ zir_body_inst: Zir.Inst.Index,
/// undefined unless analysis state is `success`.
body: ir.Body,
state: Analysis,