aboutsummaryrefslogtreecommitdiff
path: root/wasm/Driver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'wasm/Driver.cpp')
-rw-r--r--wasm/Driver.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/wasm/Driver.cpp b/wasm/Driver.cpp
index fab4c0c4ed8b..ade15a19f66e 100644
--- a/wasm/Driver.cpp
+++ b/wasm/Driver.cpp
@@ -434,7 +434,9 @@ static Symbol *handleUndefined(StringRef Name) {
static UndefinedGlobal *
createUndefinedGlobal(StringRef Name, llvm::wasm::WasmGlobalType *Type) {
auto *Sym =
- cast<UndefinedGlobal>(Symtab->addUndefinedGlobal(Name, 0, nullptr, Type));
+ cast<UndefinedGlobal>(Symtab->addUndefinedGlobal(Name, Name,
+ DefaultModule, 0,
+ nullptr, Type));
Config->AllowUndefinedSymbols.insert(Sym->getName());
Sym->IsUsedInRegularObj = true;
return Sym;