summaryrefslogtreecommitdiffstats
path: root/lld/wasm/LTO.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/wasm/LTO.cpp')
-rw-r--r--lld/wasm/LTO.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lld/wasm/LTO.cpp b/lld/wasm/LTO.cpp
index f15551da8b8..933607a0938 100644
--- a/lld/wasm/LTO.cpp
+++ b/lld/wasm/LTO.cpp
@@ -72,10 +72,11 @@ BitcodeCompiler::BitcodeCompiler() : LTOObj(createLTO()) {}
BitcodeCompiler::~BitcodeCompiler() = default;
static void undefine(Symbol *S) {
- if (isa<DefinedFunction>(S))
- replaceSymbol<UndefinedFunction>(S, S->getName(), 0);
+ if (auto F = dyn_cast<DefinedFunction>(S))
+ replaceSymbol<UndefinedFunction>(F, F->getName(), 0, F->getFile(),
+ F->FunctionType);
else if (isa<DefinedData>(S))
- replaceSymbol<UndefinedData>(S, S->getName(), 0);
+ replaceSymbol<UndefinedData>(S, S->getName(), 0, S->getFile());
else
llvm_unreachable("unexpected symbol kind");
}
OpenPOWER on IntegriCloud