[clang] [Clang][WebAssembly] Fix WASM tables to allow `__funcref` function pointers (PR #178720)

Paulo Matos via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 2 05:18:33 PST 2026


================
@@ -633,8 +633,8 @@ Value *CodeGenFunction::EmitWebAssemblyBuiltinExpr(unsigned BuiltinID,
     Function *Callee;
     if (E->getArg(1)->getType().isWebAssemblyExternrefType())
       Callee = CGM.getIntrinsic(Intrinsic::wasm_table_grow_externref);
-    else if (E->getArg(2)->getType().isWebAssemblyFuncrefType())
-      Callee = CGM.getIntrinsic(Intrinsic::wasm_table_fill_funcref);
+    else if (E->getArg(1)->getType().isWebAssemblyFuncrefType())
+      Callee = CGM.getIntrinsic(Intrinsic::wasm_table_grow_funcref);
----------------
pmatos wrote:

Nice. Happy for you to land it with the tests I suggested.

https://github.com/llvm/llvm-project/pull/178720


More information about the cfe-commits mailing list