[flang-commits] [flang] [flang][debug] Support complex types. (PR #92559)

Abid Qadeer via flang-commits flang-commits at lists.llvm.org
Mon May 20 04:44:21 PDT 2024


================
@@ -57,6 +57,16 @@ DebugTypeGenerator::convertType(mlir::Type Ty, mlir::LLVM::DIFileAttr fileAttr,
                         mlir::StringAttr::get(context, logTy.getMnemonic()),
                         kindMapping.getLogicalBitsize(logTy.getFKind()),
                         llvm::dwarf::DW_ATE_boolean);
+  } else if (fir::isa_complex(Ty)) {
+    unsigned bitWidth;
+    if (auto cplxTy = mlir::dyn_cast_or_null<mlir::ComplexType>(Ty)) {
+      auto floatTy = mlir::cast<mlir::FloatType>(cplxTy.getElementType());
+      bitWidth = floatTy.getWidth();
+    } else if (auto cplxTy = mlir::dyn_cast_or_null<fir::ComplexType>(Ty))
----------------
abidh wrote:

Thanks for pointing that out. I will fix it.

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


More information about the flang-commits mailing list