tlively added a comment. It looks like the LLVM-side changes are generally moving Wasm type classification functions to a more global location. Since no other backend should care about these things, it would be better if we could get away without these changes.
================ Comment at: llvm/include/llvm/IR/Type.h:23 #include "llvm/Support/TypeSize.h" +#include "llvm/CodeGen/WasmAddressSpaces.h" #include <cassert> ---------------- I don't know if things in IR are supposed to depend on things in CodeGen. Is there precedent here? ================ Comment at: llvm/include/llvm/IR/Type.h:220-232 + bool isWebAssemblyReferenceType() const { return isWebAssemblyExternrefType() || isWebAssemblyFuncrefType(); } + + /// Return true if this is a WebAssembly Externref Type. + bool isWebAssemblyExternrefType() const { + return getPointerAddressSpace() == + WebAssembly::WasmAddressSpace::WASM_ADDRESS_SPACE_EXTERNREF; + } ---------------- Do these need to be in Type.h? If not, it would be good to keep them in a more Wasm-specific location. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139010/new/ https://reviews.llvm.org/D139010 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits