[PATCH] D42327: [WebAssembly] Remove redundant function: addSyntheticUndefinedFunction. NFC.
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 19 17:41:43 PST 2018
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rL323024: [WebAssembly] Remove redundant function: addSyntheticUndefinedFunction. NFC. (authored by sbc, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D42327
Files:
lld/trunk/wasm/Driver.cpp
lld/trunk/wasm/SymbolTable.cpp
Index: lld/trunk/wasm/SymbolTable.cpp
===================================================================
--- lld/trunk/wasm/SymbolTable.cpp
+++ lld/trunk/wasm/SymbolTable.cpp
@@ -187,6 +187,7 @@
Symbol *SymbolTable::addUndefinedFunction(StringRef Name,
const WasmSignature *Type) {
+ DEBUG(dbgs() << "addUndefinedFunction: " << Name << "\n");
Symbol *S;
bool WasInserted;
std::tie(S, WasInserted) = insert(Name);
Index: lld/trunk/wasm/Driver.cpp
===================================================================
--- lld/trunk/wasm/Driver.cpp
+++ lld/trunk/wasm/Driver.cpp
@@ -134,14 +134,6 @@
return None;
}
-// Inject a new undefined symbol into the link. This will cause the link to
-// fail unless this symbol can be found.
-static void addSyntheticUndefinedFunction(StringRef Name,
- const WasmSignature *Type) {
- log("injecting undefined func: " + Name);
- Symtab->addUndefinedFunction(Name, Type);
-}
-
static void printHelp(const char *Argv0) {
WasmOptTable().PrintHelp(outs(), Argv0, "LLVM Linker", false);
}
@@ -293,11 +285,11 @@
if (!Config->Relocatable) {
static WasmSignature Signature = {{}, WASM_TYPE_NORESULT};
if (!Config->Entry.empty())
- addSyntheticUndefinedFunction(Config->Entry, &Signature);
+ Symtab->addUndefinedFunction(Config->Entry, &Signature);
// Handle the `--undefined <sym>` options.
for (auto* Arg : Args.filtered(OPT_undefined))
- addSyntheticUndefinedFunction(Arg->getValue(), nullptr);
+ Symtab->addUndefinedFunction(Arg->getValue(), nullptr);
// Create linker-synthetic symbols
// __wasm_call_ctors:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42327.130734.patch
Type: text/x-patch
Size: 1709 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180120/ff314708/attachment.bin>
More information about the llvm-commits
mailing list