From 4084d6e70922f8b1cc00c3a24bf5db41e03d5e79 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 10 Jan 2019 19:30:58 -0800 Subject: Fix copying of globals (#1854) This broke when we refactored imports, as now Global has two more fields. Test is on --func-metrics, which depends on copying to compute some things. --- src/ir/module-utils.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/ir/module-utils.h') diff --git a/src/ir/module-utils.h b/src/ir/module-utils.h index b488db765..66d3a1015 100644 --- a/src/ir/module-utils.h +++ b/src/ir/module-utils.h @@ -92,6 +92,8 @@ inline Global* copyGlobal(Global* global, Module& out) { ret->name = global->name; ret->type = global->type; ret->mutable_ = global->mutable_; + ret->module = global->module; + ret->base = global->base; if (global->imported()) { ret->init = nullptr; } else { -- cgit v1.2.3