summaryrefslogtreecommitdiff
path: root/src/wasm/wasm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm.cpp')
-rw-r--r--src/wasm/wasm.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp
index ab2db6bd5..4594eddd1 100644
--- a/src/wasm/wasm.cpp
+++ b/src/wasm/wasm.cpp
@@ -716,6 +716,16 @@ void Module::removeExport(Name name) {
exportsMap.erase(name);
}
+void Module::removeFunction(Name name) {
+ for (size_t i = 0; i < functions.size(); i++) {
+ if (functions[i]->name == name) {
+ functions.erase(functions.begin() + i);
+ break;
+ }
+ }
+ functionsMap.erase(name);
+}
+
// TODO: remove* for other elements
void Module::updateMaps() {