[Mlir-commits] [mlir] [mlir] Fix possible null dereference during error logging (PR #157455)

Mehdi Amini llvmlistbot at llvm.org
Wed Sep 10 01:34:10 PDT 2025


================
@@ -405,7 +405,8 @@ std::unique_ptr<MPIImplTraits> MPIImplTraits::get(ModuleOp &moduleOp) {
     return std::make_unique<OMPIImplTraits>(moduleOp);
   if (!strAttr || strAttr.getValue() != "MPICH")
     moduleOp.emitWarning() << "Unknown \"MPI:Implementation\" value in DLTI ("
-                           << strAttr.getValue() << "), defaulting to MPICH";
+                           << (strAttr ? strAttr.getValue() : "<NULL>")
----------------
joker-eph wrote:

Can we just do `<< strAttr ` ?

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


More information about the Mlir-commits mailing list