[OpenMP][MLIR] Fix warning from getIsDevice OffloadModuleInterface function
authorAndrew Gozillon <Andrew.Gozillon@amd.com>
Tue, 28 Mar 2023 16:49:22 +0000 (11:49 -0500)
committerAndrew Gozillon <Andrew.Gozillon@amd.com>
Tue, 28 Mar 2023 17:06:04 +0000 (12:06 -0500)
Missed the default return component of the function on original
implementation, which is a warning that causes subsequent
failure (but regardless it's incorrect behaviour and should
have been fixed).

mlir/include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.td

index 7262f07..69cb605 100644 (file)
@@ -79,6 +79,7 @@ def OffloadModuleInterface : OpInterface<"OffloadModuleInterface"> {
         if (Attribute isDevice = $_op->getAttr("omp.is_device"))
           if (isDevice.isa<mlir::omp::IsDeviceAttr>())
             return isDevice.dyn_cast<IsDeviceAttr>().getIsDevice();
+        return false;
       }]>,
   ];
 }