summaryrefslogtreecommitdiff
path: root/wasm/LTO.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'wasm/LTO.cpp')
-rw-r--r--wasm/LTO.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/wasm/LTO.cpp b/wasm/LTO.cpp
index 96a947e29d41..e994691cceb2 100644
--- a/wasm/LTO.cpp
+++ b/wasm/LTO.cpp
@@ -79,8 +79,9 @@ BitcodeCompiler::~BitcodeCompiler() = default;
static void undefine(Symbol *S) {
if (auto F = dyn_cast<DefinedFunction>(S))
- replaceSymbol<UndefinedFunction>(F, F->getName(), 0, F->getFile(),
- F->Signature);
+ replaceSymbol<UndefinedFunction>(F, F->getName(), F->getName(),
+ DefaultModule, 0,
+ F->getFile(), F->Signature);
else if (isa<DefinedData>(S))
replaceSymbol<UndefinedData>(S, S->getName(), 0, S->getFile());
else