[mlir][LLVM] Fix `DataLayoutTypeInterface` for opqaue pointers with non-default address space
As a fallback mechanism, if no entry was supplied for a given address space, the size or alignment for a pointer type with the default address space is returned instead. This code currently crashes with opaque pointers, as it tries to construct a typed pointer type from the opaque pointer type, leading to a null pointer dereference when fetching the element type. This patch fixes the issue by handling the opaque pointer cases explicitly. Differential Revision: https://reviews.llvm.org/D124290
Loading
Please sign in to comment