[PATCH] D62824: [WebAssembly] Add comment as follow-up to rL362276. NFC.

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 4 09:32:35 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL362522: [WebAssembly] Add comment as follow-up to rL362276. NFC. (authored by sbc, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D62824?vs=202799&id=202960#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62824/new/

https://reviews.llvm.org/D62824

Files:
  lld/trunk/wasm/SymbolTable.cpp


Index: lld/trunk/wasm/SymbolTable.cpp
===================================================================
--- lld/trunk/wasm/SymbolTable.cpp
+++ lld/trunk/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.202960.patch
Type: text/x-patch
Size: 876 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190604/6ce08e49/attachment.bin>


More information about the llvm-commits mailing list