[PATCH] D44440: [WebAssembly] Implement --print-gc-sections for synthetic functions
Nicholas Wilson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 14 09:49:28 PDT 2018
ncw added inline comments.
================
Comment at: test/wasm/undefined-weak-call.ll:16
+; CHECK-GC: removing unused section {{.*}}:(undefined function weakFunc4)
+
----------------
sbc100 wrote:
> Is this really what the stubs are called? I think we should at least make them valid C identifiers. __undefined_xxx?
In the symbol table, the stubs would have the original name. In the "name" section they have this pretty format.
Your suggested prefixed C identifier would only appear in this one single place... We could do it, it might be cleaner, but I've just played around with a couple of options and they're somewhat inelegant.
We basically want to differentiate between an InputFunction's identifier, and the "name" it has as a WasmFunction (which is demangled). We haven't needed that distinction until now.
I was actually thinking of putting the boot on the other foot: really, the `-print-gc-sections` log messages should be //demangled// for all symbols, don't you think? That would be another way to regain consistency.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D44440
More information about the llvm-commits
mailing list