File tree Expand file tree Collapse file tree 1 file changed +16
-17
lines changed Expand file tree Collapse file tree 1 file changed +16
-17
lines changed Original file line number Diff line number Diff line change @@ -928,23 +928,22 @@ mlir::Value ComplexExprEmitter::VisitAbstractConditionalOperator(
928928 Expr *cond = e->getCond ()->IgnoreParens ();
929929 mlir::Value condValue = cgf.evaluateExprAsBool (cond);
930930
931- return builder
932- .create <cir::TernaryOp>(
933- loc, condValue,
934- /* thenBuilder=*/
935- [&](mlir::OpBuilder &b, mlir::Location loc) {
936- eval.begin (cgf);
937- mlir::Value trueValue = Visit (e->getTrueExpr ());
938- b.create <cir::YieldOp>(loc, trueValue);
939- eval.end (cgf);
940- },
941- /* elseBuilder=*/
942- [&](mlir::OpBuilder &b, mlir::Location loc) {
943- eval.begin (cgf);
944- mlir::Value falseValue = Visit (e->getFalseExpr ());
945- b.create <cir::YieldOp>(loc, falseValue);
946- eval.end (cgf);
947- })
931+ return cir::TernaryOp::create (
932+ builder, loc, condValue,
933+ /* trueBuilder=*/
934+ [&](mlir::OpBuilder &b, mlir::Location loc) {
935+ eval.begin (cgf);
936+ mlir::Value trueValue = Visit (e->getTrueExpr ());
937+ cir::YieldOp::create (b, loc, trueValue);
938+ eval.end (cgf);
939+ },
940+ /* falseBuilder=*/
941+ [&](mlir::OpBuilder &b, mlir::Location loc) {
942+ eval.begin (cgf);
943+ mlir::Value falseValue = Visit (e->getFalseExpr ());
944+ cir::YieldOp::create (b, loc, falseValue);
945+ eval.end (cgf);
946+ })
948947 .getResult ();
949948}
950949
You can’t perform that action at this time.
0 commit comments