[lld] [llvm] [WebAssembly] Add exnref type (PR #93586)

Heejin Ahn via llvm-commits llvm-commits at lists.llvm.org
Tue May 28 11:33:15 PDT 2024


aheejin wrote:

> also a general question: will we actually need to use a table of exnrefs to compile C++ exceptions (I think not, right?).

No we don't need it, but in spec it should be possible. That's kind of the reason I added a couple very minimal `exnref` tests to
https://github.com/llvm/llvm-project/blob/main/llvm/test/MC/WebAssembly/basic-assembly.s and
https://github.com/llvm/llvm-project/blob/main/llvm/test/MC/WebAssembly/type-checker-errors.s
but not to other more complicated tests like
https://github.com/llvm/llvm-project/blob/main/llvm/test/MC/WebAssembly/tables.s,
https://github.com/llvm/llvm-project/blob/main/llvm/test/ObjectYAML/wasm/table_section.yaml or
https://github.com/llvm/llvm-project/blob/main/llvm/test/ObjectYAML/wasm/multiple-tables.yaml

> I guess that also means we don't need to add support for representing exnrefs in LLVM IR (to go along with the existing funcref/externref support), at least for now.

That's why I didn't added it here. Also it requires a new `addrspace` constant to represent `exnref`, which is neither discussed or necessary.

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


More information about the llvm-commits mailing list