================
@@ -165,12 +165,8 @@ mlir::Value ComplexExprEmitter::VisitChooseExpr(ChooseExpr 
*e) {
 mlir::Value
 ComplexExprEmitter::VisitCXXScalarValueInitExpr(CXXScalarValueInitExpr *e) {
   mlir::Location loc = cgf.getLoc(e->getExprLoc());
-  QualType complexElemTy =
-      e->getType()->castAs<clang::ComplexType>()->getElementType();
-  mlir::Type complexElemLLVMTy = cgf.convertType(complexElemTy);
-  mlir::TypedAttr defaultValue = builder.getZeroInitAttr(complexElemLLVMTy);
-  auto complexAttr = cir::ConstComplexAttr::get(defaultValue, defaultValue);
-  return builder.create<cir::ConstantOp>(loc, complexAttr);
+  mlir::Type complexLLVMTy = cgf.convertType(e->getType());
----------------
xlauko wrote:

I believe this is cir not llvm type. Rename to `complexTy`.

https://github.com/llvm/llvm-project/pull/147143
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to