================ @@ -226,6 +227,42 @@ mlir::Value CIRAttrToValue::visitCirAttr(cir::IntAttr intAttr) { loc, converter->convertType(intAttr.getType()), intAttr.getValue()); } +/// FPAttr visitor. +mlir::Value CIRAttrToValue::visitCirAttr(cir::FPAttr fltAttr) { + mlir::Location loc = parentOp->getLoc(); + return rewriter.create<mlir::LLVM::ConstantOp>( + loc, converter->convertType(fltAttr.getType()), fltAttr.getValue()); +} + +/// ConstComplexAttr visitor. +mlir::Value CIRAttrToValue::visitCirAttr(cir::ConstComplexAttr complexAttr) { + auto complexType = mlir::cast<cir::ComplexType>(complexAttr.getType()); + auto complexElemTy = complexType.getElementType(); + auto complexElemLLVMTy = converter->convertType(complexElemTy); ---------------- xlauko wrote:
```suggestion mlir::Type complexElemTy = complexType.getElementType(); mlir::Type complexElemLLVMTy = converter->convertType(complexElemTy); ``` https://github.com/llvm/llvm-project/pull/141369 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits