summaryrefslogtreecommitdiff
path: root/src/passes/LegalizeJSInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/LegalizeJSInterface.cpp')
-rw-r--r--src/passes/LegalizeJSInterface.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/passes/LegalizeJSInterface.cpp b/src/passes/LegalizeJSInterface.cpp
index 4bb25361f..b52c1d330 100644
--- a/src/passes/LegalizeJSInterface.cpp
+++ b/src/passes/LegalizeJSInterface.cpp
@@ -41,7 +41,7 @@ struct LegalizeJSInterface : public Pass {
for (auto& ex : module->exports) {
if (ex->kind == ExternalKind::Function) {
// if it's an import, ignore it
- if (auto* func = module->checkFunction(ex->value)) {
+ if (auto* func = module->getFunctionOrNull(ex->value)) {
if (isIllegal(func)) {
auto legalName = makeLegalStub(func, module);
ex->value = legalName;
@@ -159,7 +159,7 @@ private:
}
// a method may be exported multiple times
- if (!module->checkFunction(legal->name)) {
+ if (!module->getFunctionOrNull(legal->name)) {
module->addFunction(legal);
}
return legal->name;
@@ -225,7 +225,7 @@ private:
}
void ensureTempRet0(Module* module) {
- if (!module->checkGlobal(TEMP_RET_0)) {
+ if (!module->getGlobalOrNull(TEMP_RET_0)) {
Global* global = new Global;
global->name = TEMP_RET_0;
global->type = i32;