File tree Expand file tree Collapse file tree 3 files changed +22
-19
lines changed Expand file tree Collapse file tree 3 files changed +22
-19
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
Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ class CIRGenConsumer : public clang::ASTConsumer {
227227 .failed ()) {
228228 if (!passOptParsingFailure.empty ())
229229 diagnosticsEngine.Report (diag::err_drv_cir_pass_opt_parsing)
230- << feOptions. ClangIRLifetimeCheckOpts ;
230+ << passOptParsingFailure ;
231231 else
232232 llvm::report_fatal_error (" CIR codegen: MLIR pass manager fails "
233233 " when running CIR passes!" );
Original file line number Diff line number Diff line change 11// RUN: not %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fclangir-lifetime-check="yolo=invalid,null" -emit-cir %s -o - 2>&1 | FileCheck %s
2+ // RUN: not %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fclangir-idiom-recognizer="idiom=invalid" -emit-cir %s -o - 2>&1 | FileCheck %s --check-prefix=IDIOM
3+ // RUN: not %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fclangir-idiom-recognizer -fclangir-lib-opt="libopt=invalid" -emit-cir %s -o - 2>&1 | FileCheck %s --check-prefix=LIBOPT
24
3- // CHECK: clangir pass option 'yolo=invalid,null' not recognized
5+ // CHECK: clangir pass option 'yolo=invalid,null' not recognized
6+ // IDIOM: clangir pass option 'idiom=invalid' not recognized
7+ // LIBOPT: clangir pass option 'libopt=invalid' not recognized
You can’t perform that action at this time.
0 commit comments