summaryrefslogtreecommitdiff
path: root/src/passes/I64ToI32Lowering.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/I64ToI32Lowering.cpp')
-rw-r--r--src/passes/I64ToI32Lowering.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/passes/I64ToI32Lowering.cpp b/src/passes/I64ToI32Lowering.cpp
index 2986deb9f..697df1eef 100644
--- a/src/passes/I64ToI32Lowering.cpp
+++ b/src/passes/I64ToI32Lowering.cpp
@@ -105,7 +105,7 @@ struct I64ToI32Lowering : public WalkerPass<PostWalker<I64ToI32Lowering>> {
auto& curr = module->globals[i];
if (curr->type != i64) continue;
curr->type = i32;
- auto* high = new Global(*curr);
+ auto* high = ModuleUtils::copyGlobal(curr.get(), *module);
high->name = makeHighName(curr->name);
module->addGlobal(high);
}
@@ -361,11 +361,6 @@ struct I64ToI32Lowering : public WalkerPass<PostWalker<I64ToI32Lowering>> {
);
}
- void visitCallImport(CallImport* curr) {
- // imports cannot contain i64s
- return;
- }
-
void visitCallIndirect(CallIndirect* curr) {
visitGenericCall<CallIndirect>(
curr,