Skip to content

Commit d4aa676

Browse files
committed
Apply review feedback
1 parent 4d5a93e commit d4aa676

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,15 +1101,15 @@ class ScalarExprEmitter : public StmtVisitor<ScalarExprEmitter, mlir::Value> {
11011101
cgf.curLexScope->setAsTernary();
11021102
mlir::Value res = cgf.evaluateExprAsBool(e->getRHS());
11031103
lexScope.forceCleanup();
1104-
b.create<cir::YieldOp>(loc, res);
1104+
cir::YieldOp::create(b, loc, res);
11051105
},
11061106
/*falseBuilder*/
11071107
[&](mlir::OpBuilder &b, mlir::Location loc) {
11081108
CIRGenFunction::LexicalScope lexScope{cgf, loc,
11091109
b.getInsertionBlock()};
11101110
cgf.curLexScope->setAsTernary();
1111-
auto res = b.create<cir::ConstantOp>(loc, builder.getFalseAttr());
1112-
b.create<cir::YieldOp>(loc, res.getRes());
1111+
auto res = cir::ConstantOp::create(b, loc, builder.getFalseAttr());
1112+
cir::YieldOp::create(b, loc, res.getRes());
11131113
});
11141114
return maybePromoteBoolResult(resOp.getResult(), resTy);
11151115
}
@@ -1145,8 +1145,8 @@ class ScalarExprEmitter : public StmtVisitor<ScalarExprEmitter, mlir::Value> {
11451145
CIRGenFunction::LexicalScope lexScope{cgf, loc,
11461146
b.getInsertionBlock()};
11471147
cgf.curLexScope->setAsTernary();
1148-
auto res = b.create<cir::ConstantOp>(loc, builder.getTrueAttr());
1149-
b.create<cir::YieldOp>(loc, res.getRes());
1148+
auto res = cir::ConstantOp::create(b, loc, builder.getTrueAttr());
1149+
cir::YieldOp::create(b, loc, res.getRes());
11501150
},
11511151
/*falseBuilder*/
11521152
[&](mlir::OpBuilder &b, mlir::Location loc) {
@@ -1155,7 +1155,7 @@ class ScalarExprEmitter : public StmtVisitor<ScalarExprEmitter, mlir::Value> {
11551155
cgf.curLexScope->setAsTernary();
11561156
mlir::Value res = cgf.evaluateExprAsBool(e->getRHS());
11571157
lexScope.forceCleanup();
1158-
b.create<cir::YieldOp>(loc, res);
1158+
cir::YieldOp::create(b, loc, res);
11591159
});
11601160

11611161
return maybePromoteBoolResult(resOp.getResult(), resTy);

0 commit comments

Comments
 (0)