@@ -810,11 +810,11 @@ class FirConverter : public Fortran::lower::AbstractConverter {
810810 fir::ExtendedValue read = fir::factory::genMutableBoxRead (
811811 *builder, loc, box, /* mayBePolymorphic=*/ false );
812812 if (auto read_arr_box = read.getBoxOf <fir::ArrayBoxValue>()) {
813- fir::factory::genInlinedAllocation (
814- *builder, loc, *new_box, read_arr_box->getLBounds (),
815- read_arr_box->getExtents (),
816- /* lenParams=*/ std:: nullopt , name,
817- /* mustBeHeap=*/ true );
813+ fir::factory::genInlinedAllocation (*builder, loc, *new_box,
814+ read_arr_box->getLBounds (),
815+ read_arr_box->getExtents (),
816+ /* lenParams=*/ {} , name,
817+ /* mustBeHeap=*/ true );
818818 } else if (auto read_char_arr_box =
819819 read.getBoxOf <fir::CharArrayBoxValue>()) {
820820 fir::factory::genInlinedAllocation (
@@ -825,8 +825,8 @@ class FirConverter : public Fortran::lower::AbstractConverter {
825825 } else if (auto read_char_box =
826826 read.getBoxOf <fir::CharBoxValue>()) {
827827 fir::factory::genInlinedAllocation (*builder, loc, *new_box,
828- /* lbounds=*/ std:: nullopt ,
829- /* extents=*/ std:: nullopt ,
828+ /* lbounds=*/ {} ,
829+ /* extents=*/ {} ,
830830 read_char_box->getLen (), name,
831831 /* mustBeHeap=*/ true );
832832 } else {
@@ -4590,8 +4590,7 @@ class FirConverter : public Fortran::lower::AbstractConverter {
45904590 // the static type of the LHS.
45914591 if (Fortran::evaluate::UnwrapExpr<Fortran::evaluate::NullPointer>(
45924592 assign.rhs ))
4593- return fir::factory::createUnallocatedBox (*builder, loc, lhsBoxType,
4594- std::nullopt );
4593+ return fir::factory::createUnallocatedBox (*builder, loc, lhsBoxType, {});
45954594 hlfir::Entity rhs = Fortran::lower::convertExprToHLFIR (
45964595 loc, *this , assign.rhs , localSymbols, rhsContext);
45974596 // Create pointer descriptor value from the RHS.
@@ -5199,7 +5198,7 @@ class FirConverter : public Fortran::lower::AbstractConverter {
51995198 " LEN parameters" );
52005199 lhsRealloc = fir::factory::genReallocIfNeeded (
52015200 *builder, loc, *lhsMutableBox,
5202- /* shape=*/ std:: nullopt , lengthParams);
5201+ /* shape=*/ {} , lengthParams);
52035202 return lhsRealloc->newValue ;
52045203 }
52055204 return genExprAddr (assign.lhs , stmtCtx);
@@ -5271,7 +5270,7 @@ class FirConverter : public Fortran::lower::AbstractConverter {
52715270 if (lhsIsWholeAllocatable) {
52725271 assert (lhsRealloc.has_value ());
52735272 fir::factory::finalizeRealloc (*builder, loc, *lhsMutableBox,
5274- /* lbounds=*/ std:: nullopt ,
5273+ /* lbounds=*/ {} ,
52755274 /* takeLboundsIfRealloc=*/ false ,
52765275 *lhsRealloc);
52775276 }
@@ -6059,8 +6058,7 @@ class FirConverter : public Fortran::lower::AbstractConverter {
60596058 mlir::func::FuncOp func = fir::FirOpBuilder::createFunction (
60606059 mlir::UnknownLoc::get (context), getModuleOp (),
60616060 fir::NameUniquer::doGenerated (" Sham" ),
6062- mlir::FunctionType::get (context, std::nullopt , std::nullopt ),
6063- symbolTable);
6061+ mlir::FunctionType::get (context, {}, {}), symbolTable);
60646062 func.addEntryBlock ();
60656063 CHECK (!builder && " Expected builder to be uninitialized" );
60666064 builder = new fir::FirOpBuilder (func, bridge.getKindMap (), symbolTable);
0 commit comments