diff options
Diffstat (limited to 'src/ir/module-splitting.cpp')
-rw-r--r-- | src/ir/module-splitting.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ir/module-splitting.cpp b/src/ir/module-splitting.cpp index f4f00c9af..1f33b44ac 100644 --- a/src/ir/module-splitting.cpp +++ b/src/ir/module-splitting.cpp @@ -345,6 +345,10 @@ void ModuleSplitter::thunkExportedSecondaryFunctions() { continue; } Name secondaryFunc = ex->value; + if (primary.getFunctionOrNull(secondaryFunc)) { + // We've already created a thunk for this function + continue; + } auto tableSlot = tableManager.getSlot(secondaryFunc); auto func = std::make_unique<Function>(); |