[PATCH] D62542: [WebAssembly] Make Emscripten-specific behavior specific to the Emscripten target

Dan Gohman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 3 16:56:38 PDT 2019


sunfish marked an inline comment as done.
sunfish added inline comments.


================
Comment at: lib/MC/MCWasmStreamer.cpp:125
   case MCSA_NoDeadStrip:
-    Symbol->setExported();
     break;
----------------
sbc100 wrote:
> It looks like this is the only caller of `setExported` so you can remove `setExported` and `isExported` and probably also remove WASM_SYMBOL_EXPORTED?
> 
> In which case why not just rename WASM_SYMBOL_EXPORTED rather than adding another flag?  Or can you imagine the EXPORTED flag getting set in some other way?
I can remove `setExported` and `isExported`. But we appear to still need `WASM_SYMBOL_EXPORTED` -- there's also the code in lib/MC/WasmObjectWriter.cpp which adds `wasm::WASM_SYMBOL_EXPORTED` to symbols with NoStrip in Emscripten mode, for compatibility with Emscripten, going by [this comment](https://github.com/WebAssembly/tool-conventions/issues/64#issuecomment-455275972).


Repository:
  rL LLVM

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

https://reviews.llvm.org/D62542





More information about the llvm-commits mailing list