summaryrefslogtreecommitdiff
path: root/wasm/InputFiles.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-02-15 20:49:22 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-02-15 20:49:22 +0000
commit38e89f16767351c482670d10ce0a76f85fd327fb (patch)
tree454466a911e2ff69b599d8e5c627075df7c8eabe /wasm/InputFiles.cpp
parent774c33a182f027f50320a37542a6b47a0f9caeb3 (diff)
Notes
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);
}