Skip to content

Commit 769c89a

Browse files
committed
Fix build error.
1 parent 90e8686 commit 769c89a

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

flang/lib/Lower/OpenMP/Utils.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ mlir::FlatSymbolRefAttr getOrGenImplicitDefaultDeclareMapper(
7777
mlir::OpBuilder::InsertionGuard guard(firOpBuilder);
7878

7979
firOpBuilder.setInsertionPointToStart(converter.getModuleOp().getBody());
80-
auto declMapperOp = firOpBuilder.create<mlir::omp::DeclareMapperOp>(
81-
loc, mapperNameStr, recordType);
80+
auto declMapperOp = mlir::omp::DeclareMapperOp::create(
81+
firOpBuilder, loc, mapperNameStr, recordType);
8282
auto &region = declMapperOp.getRegion();
8383
firOpBuilder.createBlock(&region);
8484
auto mapperArg = region.addArgument(firOpBuilder.getRefType(recordType), loc);
8585

86-
auto declareOp =
87-
firOpBuilder.create<hlfir::DeclareOp>(loc, mapperArg, /*uniq_name=*/"");
86+
auto declareOp = hlfir::DeclareOp::create(firOpBuilder, loc, mapperArg,
87+
/*uniq_name=*/"");
8888

8989
const auto genBoundsOps = [&](mlir::Value mapVal,
9090
llvm::SmallVectorImpl<mlir::Value> &bounds) {
@@ -103,11 +103,11 @@ mlir::FlatSymbolRefAttr getOrGenImplicitDefaultDeclareMapper(
103103

104104
const auto getFieldRef = [&](mlir::Value rec, llvm::StringRef fieldName,
105105
mlir::Type fieldTy, mlir::Type recType) {
106-
mlir::Value field = firOpBuilder.create<fir::FieldIndexOp>(
107-
loc, fir::FieldType::get(recType.getContext()), fieldName, recType,
108-
fir::getTypeParams(rec));
109-
return firOpBuilder.create<fir::CoordinateOp>(
110-
loc, firOpBuilder.getRefType(fieldTy), rec, field);
106+
mlir::Value field = fir::FieldIndexOp::create(
107+
firOpBuilder, loc, fir::FieldType::get(recType.getContext()), fieldName,
108+
recType, fir::getTypeParams(rec));
109+
return fir::CoordinateOp::create(
110+
firOpBuilder, loc, firOpBuilder.getRefType(fieldTy), rec, field);
111111
};
112112

113113
mlir::omp::DeclareMapperInfoOperands clauseOps;
@@ -163,7 +163,7 @@ mlir::FlatSymbolRefAttr getOrGenImplicitDefaultDeclareMapper(
163163
/*partialMap=*/true);
164164

165165
clauseOps.mapVars.emplace_back(mapOp);
166-
firOpBuilder.create<mlir::omp::DeclareMapperInfoOp>(loc, clauseOps.mapVars);
166+
mlir::omp::DeclareMapperInfoOp::create(firOpBuilder, loc, clauseOps.mapVars);
167167
return mlir::FlatSymbolRefAttr::get(&converter.getMLIRContext(),
168168
mapperNameStr);
169169
}

0 commit comments

Comments
 (0)