summaryrefslogtreecommitdiff
path: root/src/passes/StackCheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/StackCheck.cpp')
-rw-r--r--src/passes/StackCheck.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/passes/StackCheck.cpp b/src/passes/StackCheck.cpp
index 23fd5be3d..e7fc3c6b3 100644
--- a/src/passes/StackCheck.cpp
+++ b/src/passes/StackCheck.cpp
@@ -39,12 +39,10 @@ static void importStackOverflowHandler(Module& module, Name name) {
ImportInfo info(module);
if (!info.getImportedFunction(ENV, name)) {
- auto* import = new Function;
- import->name = name;
+ auto import = Builder::makeFunction(name, Signature(), {});
import->module = ENV;
import->base = name;
- import->sig = Signature(Type::none, Type::none);
- module.addFunction(import);
+ module.addFunction(std::move(import));
}
}