================ @@ -316,6 +316,106 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +/// Emit an `if` on a boolean condition, filling `then` and `else` into +/// appropriated regions. +mlir::LogicalResult CIRGenFunction::emitIfOnBoolExpr(const Expr *cond, + const Stmt *thenS, + const Stmt *elseS) { + // Attempt to be more accurate as possible with IfOp location, generate + // one fused location that has either 2 or 4 total locations, depending + // on else's availability. ---------------- andykaylor wrote:
This comment feels misplaced to me. The code to fuse the if locations and the else locations is in the function below. At first glance, not seeing that happening in this function, I thought maybe the comment was out-of-date. Moving the comment to the function where the locations are fused would clarify this. https://github.com/llvm/llvm-project/pull/134333 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits