[clang] [llvm] [WebAssembly] Add support for nonnull_extern_ref type (PR #148935)

Paulo Matos via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 21 01:37:02 PDT 2025


================
@@ -29,6 +29,11 @@ def int_wasm_memory_grow :
 //===----------------------------------------------------------------------===//
 def int_wasm_ref_null_extern :
   DefaultAttrsIntrinsic<[llvm_externref_ty], [], [IntrNoMem]>;
+
+// TODO: Is this correct?
+def int_wasm_ref_nonnull_extern
+    : DefaultAttrsIntrinsic<[llvm_externref_ty], [], [IntrNoMem]>;
----------------
pmatos wrote:

As I mentioned elsewhere I would start by working out how to specify them as different types. Probably leave this one as is and the non-null version as something like: `llvm_externref_nn_ty` or similar. I don't have a clear understanding of the usage of this types in practice tbh. It would be interesting to have some insights to those wishing to use this code.

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


More information about the llvm-commits mailing list