[lld] r362522 - [WebAssembly] Add comment as follow-up to rL362276. NFC.
Sam Clegg via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 4 09:35:24 PDT 2019
Author: sbc
Date: Tue Jun 4 09:35:23 2019
New Revision: 362522
URL: http://llvm.org/viewvc/llvm-project?rev=362522&view=rev
Log:
[WebAssembly] Add comment as follow-up to rL362276. NFC.
Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62824
Modified:
lld/trunk/wasm/SymbolTable.cpp
Modified: lld/trunk/wasm/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/wasm/SymbolTable.cpp?rev=362522&r1=362521&r2=362522&view=diff
==============================================================================
--- lld/trunk/wasm/SymbolTable.cpp (original)
+++ lld/trunk/wasm/SymbolTable.cpp Tue Jun 4 09:35:23 2019
@@ -199,10 +199,12 @@ DefinedFunction *SymbolTable::addSynthet
Flags, nullptr, Function);
}
+// Adds an optional, linker generated, data symbols. The symbol will only be
+// added if there is an undefine reference to it, or if it is explictly exported
+// via the --export flag. Otherwise we don't add the symbol and return nullptr.
DefinedData *SymbolTable::addOptionalDataSymbol(StringRef Name, uint32_t Value,
uint32_t Flags) {
Symbol *S = find(Name);
- // Enable --export of optional symbols
if (!S && (Config->ExportAll || Config->ExportedSymbols.count(Name) != 0))
S = insertName(Name).first;
else if (!S || S->isDefined())
More information about the llvm-commits
mailing list