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 b000b0c38..0e810560e 100644
--- a/src/passes/LegalizeJSInterface.cpp
+++ b/src/passes/LegalizeJSInterface.cpp
@@ -53,7 +53,7 @@ struct LegalizeJSInterface : public Pass {
.getArgumentOrDefault("legalize-js-interface-export-originals", "")
.empty();
// for each illegal export, we must export a legalized stub instead
- std::vector<Export*> newExports;
+ std::vector<std::unique_ptr<Export>> newExports;
for (auto& ex : module->exports) {
if (ex->kind == ExternalKind::Function) {
// if it's an import, ignore it
@@ -81,8 +81,8 @@ struct LegalizeJSInterface : public Pass {
}
}
}
- for (auto* ex : newExports) {
- module->addExport(ex);
+ for (auto& ex : newExports) {
+ module->addExport(std::move(ex));
}
// Avoid iterator invalidation later.
std::vector<Function*> originalFunctions;