[PATCH] D41975: [WebAssembly] Don't allow functions to be named more than once

Nicholas Wilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 12 02:54:45 PST 2018


ncw added a comment.

I've just rewritten the name handling in https://reviews.llvm.org/D41955. What I did there was to associate the name with the Function (not the Symbol) since that's conceptually what the "names" section is (the debugger's name for the function body itself).

My solution was to simply iterate over DefinedFunctions when creating the "names" section in LLD. The names are attached to functions, either from their export name, or from their name specified in the names section. Writer::createNameSection is therefore shorter, and makes more sense: the "names" section is really all about iterating over the Functions, not the Symbols.

Another case of two people tackling the same problem at once!


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D41975





More information about the llvm-commits mailing list