[Mlir-commits] [mlir] [mlir] fix Undefined behavior in CastInfo::castFailed with From=<MLIRinterface> (PR #87145)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun Nov 3 06:25:08 PST 2024


================
@@ -2142,6 +2143,83 @@ struct DenseMapInfo<T,
   }
   static bool isEqual(T lhs, T rhs) { return lhs == rhs; }
 };
+
+/// Add support for llvm style casts.
+/// We provide a cast between To and From if To and From is mlir::OpInterface or
+/// derives from it.
+template <typename To, typename From>
----------------
lipracer wrote:

My changes:
![Screenshot from 2024-11-03 09-24-15](https://github.com/user-attachments/assets/a4fe9af0-0f8b-4516-962f-61084726bdb3)


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


More information about the Mlir-commits mailing list