[PATCH] D62824: [WebAssembly] Add comment as follow-up to rL362276. NFC.
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 3 14:23:50 PDT 2019
sbc100 created this revision.
Herald added subscribers: llvm-commits, sunfish, aheejin, jgravelle-google, dschuff.
Herald added a project: LLVM.
sbc100 added a reviewer: ruiu.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D62824
Files:
lld/wasm/SymbolTable.cpp
Index: lld/wasm/SymbolTable.cpp
===================================================================
--- lld/wasm/SymbolTable.cpp
+++ lld/wasm/SymbolTable.cpp
@@ -199,10 +199,12 @@
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())
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62824.202799.patch
Type: text/x-patch
Size: 858 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190603/1a1afab2/attachment.bin>
More information about the llvm-commits
mailing list