[clang] [CIR] Upstream initial for-loop support (PR #132266)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 20 11:55:05 PDT 2025


================
@@ -165,6 +165,25 @@ LValue CIRGenFunction::emitDeclRefLValue(const DeclRefExpr *e) {
   return LValue();
 }
 
+mlir::Value CIRGenFunction::evaluateExprAsBool(const Expr *e) {
----------------
andykaylor wrote:

Even for C, we want to generate a cir.bool value. The classic codegen does the equivalent, generating IR that produces an `i1` value. For example: https://godbolt.org/z/3KjonvqK1

https://github.com/llvm/llvm-project/pull/132266


More information about the cfe-commits mailing list