[PATCH] D122215: [WebAssembly] Initial support for reference type externref in clang
Paulo Matos via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 12 06:22:07 PST 2023
pmatos marked an inline comment as done.
pmatos added inline comments.
================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:806-807
+ SingletonId = \
+ DBuilder.createForwardDecl(llvm::dwarf::DW_TAG_structure_type, \
+ MangledName, TheCU, TheCU->getFile(), 0); \
+ return SingletonId; \
----------------
tlively wrote:
> How did you choose this?
This is the creation of the debug info for an opaque structure type, although I guess we could use other representations for externref, do you have any suggestions?
================
Comment at: clang/test/CodeGen/WebAssembly/wasm-externref.c:11-13
+externref_t get_null() {
+ return __builtin_wasm_ref_null_extern();
+}
----------------
tlively wrote:
> Do we need this here since the builtin is also tested in builtins-wasm.c? Are there more ways to use `externref_t` that we should test here?
Not at the moment. There's not much you can do with externref without using tables for example which is in another patch. Happy to remove this test as we have something similar indeed in builtins-wasm.c.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122215/new/
https://reviews.llvm.org/D122215
More information about the llvm-commits
mailing list