forked from OSchip/llvm-project
[lld][WebAssembly] Fix typo in function name
addOptionalGlobalSymbols should be addOptionalGlobalSymbol. Also, remove unnecessary additional argument to make the signature match the sibling function: addOptionalDataSymbol. Differential Revision: https://reviews.llvm.org/D96305
This commit is contained in:
parent
98c21289f1
commit
88e4056b44
|
@ -596,8 +596,7 @@ static GlobalSymbol *createGlobalVariable(StringRef name, bool isMutable) {
|
||||||
|
|
||||||
static GlobalSymbol *createOptionalGlobal(StringRef name, bool isMutable) {
|
static GlobalSymbol *createOptionalGlobal(StringRef name, bool isMutable) {
|
||||||
InputGlobal *g = createGlobal(name, isMutable);
|
InputGlobal *g = createGlobal(name, isMutable);
|
||||||
return symtab->addOptionalGlobalSymbols(name, WASM_SYMBOL_VISIBILITY_HIDDEN,
|
return symtab->addOptionalGlobalSymbol(name, g);
|
||||||
g);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create ABI-defined synthetic symbols
|
// Create ABI-defined synthetic symbols
|
||||||
|
|
|
@ -258,16 +258,16 @@ DefinedGlobal *SymbolTable::addSyntheticGlobal(StringRef name, uint32_t flags,
|
||||||
nullptr, global);
|
nullptr, global);
|
||||||
}
|
}
|
||||||
|
|
||||||
DefinedGlobal *SymbolTable::addOptionalGlobalSymbols(StringRef name,
|
DefinedGlobal *SymbolTable::addOptionalGlobalSymbol(StringRef name,
|
||||||
uint32_t flags,
|
InputGlobal *global) {
|
||||||
InputGlobal *global) {
|
LLVM_DEBUG(dbgs() << "addOptionalGlobalSymbol: " << name << " -> " << global
|
||||||
LLVM_DEBUG(dbgs() << "addOptionalGlobalSymbols: " << name << " -> " << global
|
|
||||||
<< "\n");
|
<< "\n");
|
||||||
Symbol *s = find(name);
|
Symbol *s = find(name);
|
||||||
if (!s || s->isDefined())
|
if (!s || s->isDefined())
|
||||||
return nullptr;
|
return nullptr;
|
||||||
syntheticGlobals.emplace_back(global);
|
syntheticGlobals.emplace_back(global);
|
||||||
return replaceSymbol<DefinedGlobal>(s, name, flags, nullptr, global);
|
return replaceSymbol<DefinedGlobal>(s, name, WASM_SYMBOL_VISIBILITY_HIDDEN,
|
||||||
|
nullptr, global);
|
||||||
}
|
}
|
||||||
|
|
||||||
DefinedTable *SymbolTable::addSyntheticTable(StringRef name, uint32_t flags,
|
DefinedTable *SymbolTable::addSyntheticTable(StringRef name, uint32_t flags,
|
||||||
|
|
|
@ -91,8 +91,7 @@ public:
|
||||||
DefinedFunction *addSyntheticFunction(StringRef name, uint32_t flags,
|
DefinedFunction *addSyntheticFunction(StringRef name, uint32_t flags,
|
||||||
InputFunction *function);
|
InputFunction *function);
|
||||||
DefinedData *addOptionalDataSymbol(StringRef name, uint64_t value = 0);
|
DefinedData *addOptionalDataSymbol(StringRef name, uint64_t value = 0);
|
||||||
DefinedGlobal *addOptionalGlobalSymbols(StringRef name, uint32_t flags,
|
DefinedGlobal *addOptionalGlobalSymbol(StringRef name, InputGlobal *global);
|
||||||
InputGlobal *global);
|
|
||||||
DefinedTable *addSyntheticTable(StringRef name, uint32_t flags,
|
DefinedTable *addSyntheticTable(StringRef name, uint32_t flags,
|
||||||
InputTable *global);
|
InputTable *global);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue