summaryrefslogtreecommitdiff
path: root/src/ir/module-utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir/module-utils.h')
-rw-r--r--src/ir/module-utils.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ir/module-utils.h b/src/ir/module-utils.h
index d33a47673..eabcd036c 100644
--- a/src/ir/module-utils.h
+++ b/src/ir/module-utils.h
@@ -24,8 +24,14 @@
namespace wasm::ModuleUtils {
// Copies a function into a module. If newName is provided it is used as the
-// name of the function (otherwise the original name is copied).
-Function* copyFunction(Function* func, Module& out, Name newName = Name());
+// name of the function (otherwise the original name is copied). If fileIndexMap
+// is specified, it is used to rename source map filename indices when copying
+// the function from one module to another one.
+Function*
+copyFunction(Function* func,
+ Module& out,
+ Name newName = Name(),
+ std::optional<std::vector<Index>> fileIndexMap = std::nullopt);
Global* copyGlobal(Global* global, Module& out);