sunfish added a comment.

Instead of creating a new LLVM-IR-level attribute here, could you have clang 
translate the attribute to "wasm-export-name", to keep the LLVM-IR level 
simpler?

Also, I myself would be more comfortable with this change if it were restricted 
to Emscripten for now. `export_name` already exists and works in both 
Emscripten and non-Emscripten targets. If there's demand for this new syntax 
outside of Emscripten, I'm happy to reconsider, but until then it seems better 
to be conservative. Obviously it's not possible to completely prevent people 
from becoming dependent on C++ ABI details, but we can avoid giving them tools 
that make it easy to do the wrong thing. And we can keep the ecosystem simpler 
if we don't have multiple ways to do the same thing.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76547



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to