// Set the insertion point in the function entry block.
mlir::ModuleOp mod = builder.create<mlir::ModuleOp>(loc);
mlir::func::FuncOp func = mlir::func::FuncOp::create(
- loc, "func1", builder.getFunctionType(llvm::None, llvm::None));
+ loc, "func1", builder.getFunctionType(std::nullopt, std::nullopt));
auto *entryBlock = func.addEntryBlock();
mod.push_back(mod);
builder.setInsertionPointToStart(entryBlock);
// Set the insertion point in the function entry block.
mlir::ModuleOp mod = builder.create<mlir::ModuleOp>(loc);
mlir::func::FuncOp func = mlir::func::FuncOp::create(
- loc, "func1", builder.getFunctionType(llvm::None, llvm::None));
+ loc, "func1", builder.getFunctionType(std::nullopt, std::nullopt));
auto *entryBlock = func.addEntryBlock();
mod.push_back(mod);
builder.setInsertionPointToStart(entryBlock);
// Set the insertion point in the function entry block.
mlir::ModuleOp mod = builder.create<mlir::ModuleOp>(loc);
mlir::func::FuncOp func = mlir::func::FuncOp::create(
- loc, "func1", builder.getFunctionType(llvm::None, llvm::None));
+ loc, "func1", builder.getFunctionType(std::nullopt, std::nullopt));
auto *entryBlock = func.addEntryBlock();
mod.push_back(mod);
builder.setInsertionPointToStart(entryBlock);
EXPECT_EQ(nullptr, func2);
auto loc = builder.getUnknownLoc();
func2 = builder.createFunction(
- loc, "func2", builder.getFunctionType(llvm::None, llvm::None));
+ loc, "func2", builder.getFunctionType(std::nullopt, std::nullopt));
auto func2query = builder.getNamedFunction("func2");
EXPECT_EQ(func2, func2query);
}
// Set the insertion point in the function entry block.
mlir::ModuleOp mod = builder.create<mlir::ModuleOp>(loc);
mlir::func::FuncOp func = mlir::func::FuncOp::create(
- loc, "func1", builder.getFunctionType(llvm::None, llvm::None));
+ loc, "func1", builder.getFunctionType(std::nullopt, std::nullopt));
auto *entryBlock = func.addEntryBlock();
mod.push_back(mod);
builder.setInsertionPointToStart(entryBlock);
mlir::ModuleOp mod = builder.create<mlir::ModuleOp>(loc);
mlir::func::FuncOp func =
mlir::func::FuncOp::create(loc, "runtime_unit_tests_func",
- builder.getFunctionType(llvm::None, llvm::None));
+ builder.getFunctionType(std::nullopt, std::nullopt));
auto *entryBlock = func.addEntryBlock();
mod.push_back(mod);
builder.setInsertionPointToStart(entryBlock);
mlir::ModuleOp mod = builder->create<mlir::ModuleOp>(loc);
mlir::func::FuncOp func =
mlir::func::FuncOp::create(loc, "fortran_variable_tests",
- builder->getFunctionType(llvm::None, llvm::None));
+ builder->getFunctionType(std::nullopt, std::nullopt));
auto *entryBlock = func.addEntryBlock();
mod.push_back(mod);
builder->setInsertionPointToStart(entryBlock);
mlir::Value addr = builder->create<fir::AllocaOp>(loc, eleType);
auto name = mlir::StringAttr::get(&context, "x");
auto declare = builder->create<fir::DeclareOp>(loc, addr.getType(), addr,
- /*shape=*/mlir::Value{}, /*typeParams=*/llvm::None, name,
+ /*shape=*/mlir::Value{}, /*typeParams=*/std::nullopt, name,
/*fortran_attrs=*/fir::FortranVariableFlagsAttr{});
fir::FortranVariableOpInterface fortranVariable = declare;
extents.size(), fir::SequenceType::getUnknownExtent());
mlir::Type seqTy = fir::SequenceType::get(typeShape, eleType);
mlir::Value addr = builder->create<fir::AllocaOp>(
- loc, seqTy, /*pinned=*/false, /*typeParams=*/llvm::None, extents);
+ loc, seqTy, /*pinned=*/false, /*typeParams=*/std::nullopt, extents);
mlir::Value shape = createShape(extents);
auto name = mlir::StringAttr::get(&context, "x");
auto declare = builder->create<fir::DeclareOp>(loc, addr.getType(), addr,
- shape, /*typeParams*/ llvm::None, name,
+ shape, /*typeParams*/ std::nullopt, name,
/*fortran_attrs=*/fir::FortranVariableFlagsAttr{});
fir::FortranVariableOpInterface fortranVariable = declare;