summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/passes/LegalizeJSInterface.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/passes/LegalizeJSInterface.cpp b/src/passes/LegalizeJSInterface.cpp
index 23a4868ac..1f02cd4d7 100644
--- a/src/passes/LegalizeJSInterface.cpp
+++ b/src/passes/LegalizeJSInterface.cpp
@@ -72,6 +72,10 @@ struct LegalizeJSInterface : public Pass {
}
}
if (illegalToLegal.size() > 0) {
+ for (auto& pair : illegalToLegal) {
+ module->removeImport(pair.first);
+ }
+
for (auto* im : newImports) {
module->addImport(im);
}