[WebAssembly] Fixed AsmPrinter not emitting .functype for intrinsics
Intrinsics like `memset` were not emitted as `.functype` because WebAssemblyAsmPrinter::emitExternalDecls explicitly skips symbols that are isIntrinsic. Removing that check doesn't work, since the symbol from the module refers to a 4-argument `llvm.memset.p0i8.i32` rather than the 3-argument `memset` symbol referenced in the call. Our `WebAssemblyMCLowerPrePass` however does collect the `memset` symbol, so the current solution is as simple as emitting `.functype` for those. Fixes: https://github.com/llvm/llvm-project/issues/53712 Differential Revision: https://reviews.llvm.org/D120365
Loading
Please sign in to comment