@@ -810,11 +810,11 @@ class FirConverter : public Fortran::lower::AbstractConverter {
810
810
fir::ExtendedValue read = fir::factory::genMutableBoxRead (
811
811
*builder, loc, box, /* mayBePolymorphic=*/ false );
812
812
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 );
818
818
} else if (auto read_char_arr_box =
819
819
read.getBoxOf <fir::CharArrayBoxValue>()) {
820
820
fir::factory::genInlinedAllocation (
@@ -825,8 +825,8 @@ class FirConverter : public Fortran::lower::AbstractConverter {
825
825
} else if (auto read_char_box =
826
826
read.getBoxOf <fir::CharBoxValue>()) {
827
827
fir::factory::genInlinedAllocation (*builder, loc, *new_box,
828
- /* lbounds=*/ std::nullopt ,
829
- /* extents=*/ std::nullopt ,
828
+ /* lbounds=*/ {} ,
829
+ /* extents=*/ {} ,
830
830
read_char_box->getLen (), name,
831
831
/* mustBeHeap=*/ true );
832
832
} else {
@@ -4590,8 +4590,7 @@ class FirConverter : public Fortran::lower::AbstractConverter {
4590
4590
// the static type of the LHS.
4591
4591
if (Fortran::evaluate::UnwrapExpr<Fortran::evaluate::NullPointer>(
4592
4592
assign.rhs ))
4593
- return fir::factory::createUnallocatedBox (*builder, loc, lhsBoxType,
4594
- std::nullopt);
4593
+ return fir::factory::createUnallocatedBox (*builder, loc, lhsBoxType, {});
4595
4594
hlfir::Entity rhs = Fortran::lower::convertExprToHLFIR (
4596
4595
loc, *this , assign.rhs , localSymbols, rhsContext);
4597
4596
// Create pointer descriptor value from the RHS.
@@ -5199,7 +5198,7 @@ class FirConverter : public Fortran::lower::AbstractConverter {
5199
5198
" LEN parameters" );
5200
5199
lhsRealloc = fir::factory::genReallocIfNeeded (
5201
5200
*builder, loc, *lhsMutableBox,
5202
- /* shape=*/ std::nullopt , lengthParams);
5201
+ /* shape=*/ {} , lengthParams);
5203
5202
return lhsRealloc->newValue ;
5204
5203
}
5205
5204
return genExprAddr (assign.lhs , stmtCtx);
@@ -5271,7 +5270,7 @@ class FirConverter : public Fortran::lower::AbstractConverter {
5271
5270
if (lhsIsWholeAllocatable) {
5272
5271
assert (lhsRealloc.has_value ());
5273
5272
fir::factory::finalizeRealloc (*builder, loc, *lhsMutableBox,
5274
- /* lbounds=*/ std::nullopt ,
5273
+ /* lbounds=*/ {} ,
5275
5274
/* takeLboundsIfRealloc=*/ false ,
5276
5275
*lhsRealloc);
5277
5276
}
@@ -6059,8 +6058,7 @@ class FirConverter : public Fortran::lower::AbstractConverter {
6059
6058
mlir::func::FuncOp func = fir::FirOpBuilder::createFunction (
6060
6059
mlir::UnknownLoc::get (context), getModuleOp (),
6061
6060
fir::NameUniquer::doGenerated (" Sham" ),
6062
- mlir::FunctionType::get (context, std::nullopt, std::nullopt),
6063
- symbolTable);
6061
+ mlir::FunctionType::get (context, {}, {}), symbolTable);
6064
6062
func.addEntryBlock ();
6065
6063
CHECK (!builder && " Expected builder to be uninitialized" );
6066
6064
builder = new fir::FirOpBuilder (func, bridge.getKindMap (), symbolTable);
0 commit comments