[flang] Fixed build issue after 88f07a736bbc3f0062d7d8f4032f0b54aff5c018
authorSlava Zakharin <szakharin@nvidia.com>
Wed, 5 Oct 2022 19:48:03 +0000 (12:48 -0700)
committerSlava Zakharin <szakharin@nvidia.com>
Wed, 5 Oct 2022 19:59:31 +0000 (12:59 -0700)
nullptr matches both against ::mlir::UnitAttr and ::mlir::TypeRange,
so the following two candidates fit:
static void mlir::omp::OrderedRegionOp::build(::mlir::OpBuilder &odsBuilder,
    ::mlir::OperationState &odsState,
    /*optional*/::mlir::UnitAttr simd)
static void mlir::omp::OrderedRegionOp::build(::mlir::OpBuilder &odsBuilder,
    ::mlir::OperationState &odsState,
    ::mlir::TypeRange resultTypes,
    /*optional*/bool simd = false)

flang/lib/Lower/OpenMP.cpp

index 31709d6..82c04ab 100644 (file)
@@ -841,7 +841,7 @@ genOMP(Fortran::lower::AbstractConverter &converter,
                                   &opClauseList);
   } else if (blockDirective.v == llvm::omp::OMPD_ordered) {
     auto orderedOp = firOpBuilder.create<mlir::omp::OrderedRegionOp>(
-        currentLocation, /*simd=*/nullptr);
+        currentLocation, /*simd=*/false);
     createBodyOfOp<omp::OrderedRegionOp>(orderedOp, converter, currentLocation,
                                          eval);
   } else if (blockDirective.v == llvm::omp::OMPD_task) {