[flang-commits] [flang] [flang][debug] Support IndexType. (PR #113921)
Abid Qadeer via flang-commits
flang-commits at lists.llvm.org
Mon Oct 28 10:38:10 PDT 2024
================
@@ -583,6 +583,9 @@ DebugTypeGenerator::convertType(mlir::Type Ty, mlir::LLVM::DIFileAttr fileAttr,
return convertVectorType(vecTy, fileAttr, scope, declOp);
} else if (mlir::isa<mlir::NoneType>(Ty)) {
return mlir::LLVM::DINullTypeAttr::get(context);
+ } else if (mlir::isa<mlir::IndexType>(Ty)) {
+ return genBasicType(context, mlir::StringAttr::get(context, "integer"), 64,
----------------
abidh wrote:
I was thinking about the same issue and tried to see if this information is parameterized somewhere. But I found that `LLVMTypeConverter` [here](https://github.com/llvm/llvm-project/blob/98e3075df992636fa42aafde96748d1d5c834688/flang/lib/Optimizer/CodeGen/TypeConverter.cpp#L132) seems to always use the 64-bit for the index type so used the same logic.
https://github.com/llvm/llvm-project/pull/113921
More information about the flang-commits
mailing list