[PATCH] D54279: wasm32: Respect `--no-mangle` in more locations in LLD

Alex Crichton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 8 16:33:50 PST 2018


alexcrichton added a comment.

>   Did you run the tests?

Er oops sorry about that, should be updated now! I don't have tons of experience with LLVM's tests though, so if you've got an idea of how to test with less duplication I can update to that!



================
Comment at: wasm/Writer.cpp:568
-        Optional<std::string> Name = demangleItanium(F->getName());
-        writeStr(Sub.OS, Name ? StringRef(*Name) : F->getName(), "symbol name");
       }
----------------
sbc100 wrote:
> alexcrichton wrote:
> > sbc100 wrote:
> > > I think the idea was that the debug section should always contain de-mangled names and that --no-demangle was for the error message and what not.  I don't feel strongly about this though.    Do you even want mangled names in the names section?
> > Oh that makes sense! Our use case is that the Rust demangling scheme is itanium-like but not exactly. When run through the itanium demangler Rust symbols look reasonable, but they look much better when run through a Rust-specific demangler.
> > 
> So would the idea be that you would run a post-link tool to demangle the names section? 
Indeed! That's what we currently have where `wasm-bindgen` as it's modifying the `*.wasm` will automatically demangle all the rust-looking names in the names section.


https://reviews.llvm.org/D54279





More information about the llvm-commits mailing list