[flang-commits] [flang] [flang][debug] Add support for fixed size arrays. (PR #92568)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Mon May 20 04:00:39 PDT 2024
================
@@ -37,6 +37,44 @@ static mlir::LLVM::DITypeAttr genPlaceholderType(mlir::MLIRContext *context) {
llvm::dwarf::DW_ATE_signed);
}
+mlir::LLVM::DITypeAttr DebugTypeGenerator::convertSequenceType(
+ fir::SequenceType seqTy, mlir::LLVM::DIFileAttr fileAttr,
+ mlir::LLVM::DIScopeAttr scope, mlir::Location loc) {
+
+ mlir::MLIRContext *context = module.getContext();
+ // FIXME: Only fixed sizes arrays handled at the moment.
+ if (seqTy.hasDynamicExtents())
+ return genPlaceholderType(context);
+
+ llvm::SmallVector<mlir::LLVM::DINodeAttr> elements;
+ auto elemTy = convertType(seqTy.getEleTy(), fileAttr, scope, loc);
+
+ for (auto dim : seqTy.getShape()) {
+ auto intTy = mlir::IntegerType::get(context, 64);
+ // FIXME: Only supporting lower bound of 1 at the moment. The
+ // 'SequenceType' has information about the shape but not the shift. In
+ // cases, where the conversion originated during the processing of
----------------
tblah wrote:
nit
```suggestion
// cases where the conversion originated during the processing of
```
https://github.com/llvm/llvm-project/pull/92568
More information about the flang-commits
mailing list