We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b2053c commit 099c13cCopy full SHA for 099c13c
clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
@@ -1760,7 +1760,7 @@ mlir::LogicalResult CIRToLLVMConstantOpLowering::matchAndRewrite(
1760
// during a pass as long as they don't live past the end of the pass.
1761
attr = op.getValue();
1762
} else if (mlir::isa<cir::BoolType>(op.getType())) {
1763
- int value = (op.getValue() == cir::BoolAttr::get(getContext(), true));
+ int value = mlir::cast<cir::BoolAttr>(op.getValue()).getValue();
1764
attr = rewriter.getIntegerAttr(typeConverter->convertType(op.getType()),
1765
value);
1766
} else if (mlir::isa<cir::IntType>(op.getType())) {
0 commit comments