[Mlir-commits] [mlir] [mlir][core|ptr] Add `PtrLikeTypeInterface` and casting ops to the `ptr` dialect (PR #137469)
Mehdi Amini
llvmlistbot at llvm.org
Sun Apr 27 03:56:15 PDT 2025
================
@@ -63,6 +64,54 @@ def Ptr_PtrType : Ptr_Type<"Ptr", "ptr", [
return $_get(memorySpace.getContext(), memorySpace);
}]>
];
+ let extraClassDeclaration = [{
+ // `PtrLikeTypeInterface` interface methods.
+ /// Returns `Type()` as this pointer type is opaque.
+ Type getElementType() const {
+ return Type();
+ }
+ /// Clones the pointer with specified memory space or returns failure
+ /// if an `elementType` was specified or if the memory space doesn't
----------------
joker-eph wrote:
Nevermind, I thought I was reading the declaration for the method on the Interface!
https://github.com/llvm/llvm-project/pull/137469
More information about the Mlir-commits
mailing list