HomePhabricator

[WebAssembly] Ignore explicit section names for functions

Authored by sbc100 on Jun 14 2018, 11:48 AM.

Description

[WebAssembly] Ignore explicit section names for functions

WebAssembly doesn't support more than one function per section
and we rely on function sections being unique. This change ignores
the section provided by the function to avoid two functions being
in the same section.

Without this change the object writer produces the following
error for this test:
LLVM ERROR: section already has a defining function: baz

Differential Revision: https://reviews.llvm.org/D48178

llvm-svn: 334752