diff options
Diffstat (limited to 'flang/lib/Lower/Bridge.cpp')
| -rw-r--r-- | flang/lib/Lower/Bridge.cpp | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/flang/lib/Lower/Bridge.cpp b/flang/lib/Lower/Bridge.cpp index 33c1f1e7a3c3..5f0783f869bf 100644 --- a/flang/lib/Lower/Bridge.cpp +++ b/flang/lib/Lower/Bridge.cpp @@ -810,11 +810,11 @@ public: fir::ExtendedValue read = fir::factory::genMutableBoxRead( *builder, loc, box, /*mayBePolymorphic=*/false); if (auto read_arr_box = read.getBoxOf<fir::ArrayBoxValue>()) { - fir::factory::genInlinedAllocation( - *builder, loc, *new_box, read_arr_box->getLBounds(), - read_arr_box->getExtents(), - /*lenParams=*/std::nullopt, name, - /*mustBeHeap=*/true); + fir::factory::genInlinedAllocation(*builder, loc, *new_box, + read_arr_box->getLBounds(), + read_arr_box->getExtents(), + /*lenParams=*/{}, name, + /*mustBeHeap=*/true); } else if (auto read_char_arr_box = read.getBoxOf<fir::CharArrayBoxValue>()) { fir::factory::genInlinedAllocation( @@ -825,8 +825,8 @@ public: } else if (auto read_char_box = read.getBoxOf<fir::CharBoxValue>()) { fir::factory::genInlinedAllocation(*builder, loc, *new_box, - /*lbounds=*/std::nullopt, - /*extents=*/std::nullopt, + /*lbounds=*/{}, + /*extents=*/{}, read_char_box->getLen(), name, /*mustBeHeap=*/true); } else { @@ -1466,8 +1466,9 @@ private: assert(falseTarget && "missing conditional branch false block"); mlir::Location loc = toLocation(); mlir::Value bcc = builder->createConvert(loc, builder->getI1Type(), cond); - builder->create<mlir::cf::CondBranchOp>(loc, bcc, trueTarget, std::nullopt, - falseTarget, std::nullopt); + builder->create<mlir::cf::CondBranchOp>(loc, bcc, trueTarget, + mlir::ValueRange{}, falseTarget, + mlir::ValueRange{}); } void genConditionalBranch(mlir::Value cond, Fortran::lower::pft::Evaluation *trueTarget, @@ -2556,8 +2557,8 @@ private: builder->setInsertionPointToEnd(loopWrapperOp.getBody()); auto loopOp = builder->create<fir::DoConcurrentLoopOp>( loc, nestLBs, nestUBs, nestSts, /*loopAnnotation=*/nullptr, - /*local_vars=*/std::nullopt, - /*local_syms=*/nullptr, /*reduce_vars=*/std::nullopt, + /*local_vars=*/mlir::ValueRange{}, + /*local_syms=*/nullptr, /*reduce_vars=*/mlir::ValueRange{}, /*reduce_byref=*/nullptr, /*reduce_syms=*/nullptr, /*reduce_attrs=*/nullptr); @@ -3810,9 +3811,9 @@ private: mlir::Block *selectCaseBlock = insertBlock(blockList[0]); mlir::Block *assumedSizeBlock = rankStarBlock ? rankStarBlock : defaultBlock; - builder->create<mlir::cf::CondBranchOp>(loc, isAssumedSize, - assumedSizeBlock, std::nullopt, - selectCaseBlock, std::nullopt); + builder->create<mlir::cf::CondBranchOp>( + loc, isAssumedSize, assumedSizeBlock, mlir::ValueRange{}, + selectCaseBlock, mlir::ValueRange{}); startBlock(selectCaseBlock); } // Create fir.select_case for the other rank cases. @@ -4590,8 +4591,7 @@ private: // the static type of the LHS. if (Fortran::evaluate::UnwrapExpr<Fortran::evaluate::NullPointer>( assign.rhs)) - return fir::factory::createUnallocatedBox(*builder, loc, lhsBoxType, - std::nullopt); + return fir::factory::createUnallocatedBox(*builder, loc, lhsBoxType, {}); hlfir::Entity rhs = Fortran::lower::convertExprToHLFIR( loc, *this, assign.rhs, localSymbols, rhsContext); // Create pointer descriptor value from the RHS. @@ -5199,7 +5199,7 @@ private: "LEN parameters"); lhsRealloc = fir::factory::genReallocIfNeeded( *builder, loc, *lhsMutableBox, - /*shape=*/std::nullopt, lengthParams); + /*shape=*/{}, lengthParams); return lhsRealloc->newValue; } return genExprAddr(assign.lhs, stmtCtx); @@ -5271,7 +5271,7 @@ private: if (lhsIsWholeAllocatable) { assert(lhsRealloc.has_value()); fir::factory::finalizeRealloc(*builder, loc, *lhsMutableBox, - /*lbounds=*/std::nullopt, + /*lbounds=*/{}, /*takeLboundsIfRealloc=*/false, *lhsRealloc); } @@ -6059,8 +6059,7 @@ private: mlir::func::FuncOp func = fir::FirOpBuilder::createFunction( mlir::UnknownLoc::get(context), getModuleOp(), fir::NameUniquer::doGenerated("Sham"), - mlir::FunctionType::get(context, std::nullopt, std::nullopt), - symbolTable); + mlir::FunctionType::get(context, {}, {}), symbolTable); func.addEntryBlock(); CHECK(!builder && "Expected builder to be uninitialized"); builder = new fir::FirOpBuilder(func, bridge.getKindMap(), symbolTable); |
