summaryrefslogtreecommitdiff
path: root/wasm/InputFiles.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'wasm/InputFiles.cpp')
-rw-r--r--wasm/InputFiles.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/wasm/InputFiles.cpp b/wasm/InputFiles.cpp
index e5da23db3773..1e5427216354 100644
--- a/wasm/InputFiles.cpp
+++ b/wasm/InputFiles.cpp
@@ -377,11 +377,15 @@ Symbol *ObjFile::createUndefined(const WasmSymbol &Sym) {
switch (Sym.Info.Kind) {
case WASM_SYMBOL_TYPE_FUNCTION:
- return Symtab->addUndefinedFunction(Name, Flags, this, Sym.Signature);
+ return Symtab->addUndefinedFunction(Name, Sym.Info.ImportName,
+ Sym.Info.ImportModule, Flags, this,
+ Sym.Signature);
case WASM_SYMBOL_TYPE_DATA:
return Symtab->addUndefinedData(Name, Flags, this);
case WASM_SYMBOL_TYPE_GLOBAL:
- return Symtab->addUndefinedGlobal(Name, Flags, this, Sym.GlobalType);
+ return Symtab->addUndefinedGlobal(Name, Sym.Info.ImportName,
+ Sym.Info.ImportModule, Flags, this,
+ Sym.GlobalType);
case WASM_SYMBOL_TYPE_SECTION:
llvm_unreachable("section symbols cannot be undefined");
}
@@ -445,7 +449,8 @@ static Symbol *createBitcodeSymbol(const lto::InputFile::Symbol &ObjSym,
if (ObjSym.isUndefined()) {
if (ObjSym.isExecutable())
- return Symtab->addUndefinedFunction(Name, Flags, &F, nullptr);
+ return Symtab->addUndefinedFunction(Name, Name, DefaultModule, Flags, &F,
+ nullptr);
return Symtab->addUndefinedData(Name, Flags, &F);
}