================
@@ -456,9 +456,7 @@ mlir::LogicalResult CIRGenFunction::emitForStmt(const
ForStmt &s) {
// scalar type.
condVal = evaluateExprAsBool(s.getCond());
} else {
- cir::BoolType boolTy = cir::BoolType::get(b.getContext());
- condVal = b.create<cir::ConstantOp>(
- loc, boolTy, cir::BoolAttr::get(b.getContext(), boolTy, true));
+ condVal = b.create<cir::ConstantOp>(loc, builder.getTrueAttr());
----------------
xlauko wrote:
`b` is `mlir::OpBuilder` here which does not have this method.
It can be done as `CIRBaseBuilderTy(b).getTrue()`.
https://github.com/llvm/llvm-project/pull/136366
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits