[PATCH] D96165: [WebAssembly] ensure .functype applies to last non-local label in assembler

Wouter van Oortmerssen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 5 14:12:53 PST 2021


aardappel added inline comments.


================
Comment at: lld/test/wasm/command-exports.s:44
+call_dtors.1:
+	.functype	call_dtors.1 (i32) -> ()
 	call	some_dtor
----------------
sbc100 wrote:
> This looks a little worrying since I imagine what we are looking at here output from a compiler pass.
> 
> Can you check that `WebAssemblyLowerGlobalDtors` doesn't generate functions with local names like this?   I think you can just build anything with static C++ ctor/dtor to see it in action.
Good catch, it generates functions starting with `register_call_dtors` with `Function::PrivateLinkage`, which I guess at an asm level turns into `.L` labels.



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

https://reviews.llvm.org/D96165



More information about the llvm-commits mailing list