Skip to content

Commit 37c311e

Browse files
ktrasJDPailleux
authored andcommitted
Update builder.create<fir::OpTy> into fir::OpTy::create calls
1 parent 027cdab commit 37c311e

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

flang/lib/Lower/Runtime.cpp

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,14 @@ static std::pair<mlir::Value, mlir::Value> getStatAndErrmsg(
7272
}
7373

7474
if (!statExpr) {
75-
statExpr = builder.create<fir::AbsentOp>(
76-
loc, builder.getRefType(builder.getI32Type()));
75+
statExpr = fir::AbsentOp::create(builder, loc,
76+
builder.getRefType(builder.getI32Type()));
7777
}
7878
if (!errMsgExpr) {
79-
errMsgExpr = builder.create<fir::AbsentOp>(
80-
loc, fir::BoxType::get(fir::CharacterType::get(
81-
builder.getContext(), 1, fir::CharacterType::unknownLen())));
79+
errMsgExpr = fir::AbsentOp::create(
80+
builder, loc,
81+
fir::BoxType::get(fir::CharacterType::get(
82+
builder.getContext(), 1, fir::CharacterType::unknownLen())));
8283
}
8384
return {statExpr, errMsgExpr};
8485
}
@@ -243,10 +244,11 @@ void Fortran::lower::genSyncImagesStatement(
243244
fir::getBase(converter.genExprBox(loc, *expr, stmtCtx));
244245
},
245246
[&](const Fortran::parser::Star &) {
246-
imageSet = builder.create<fir::AbsentOp>(
247-
loc, fir::BoxType::get(fir::SequenceType::get(
248-
{fir::SequenceType::getUnknownExtent()},
249-
builder.getI32Type())));
247+
imageSet = fir::AbsentOp::create(
248+
builder, loc,
249+
fir::BoxType::get(fir::SequenceType::get(
250+
{fir::SequenceType::getUnknownExtent()},
251+
builder.getI32Type())));
250252
}},
251253
imgSet.u);
252254

0 commit comments

Comments
 (0)