[flang-commits] [flang] [flang][debuginfo] Emit DW_AT_type for DW_TAG_string_type DIEs [3/3] (PR #231960)
Abid Qadeer via flang-commits
flang-commits at lists.llvm.org
Thu Oct 15 03:23:39 PDT 2026
================
@@ -730,12 +730,18 @@ mlir::LLVM::DITypeAttr DebugTypeGenerator::convertCharacterType(
}
}
- // TODO: Populate the charType field to represent strings with non-default
- // character types. Please see issue #95440 for more details.
+ // Set type of the underlying characters in the string
+ unsigned charBitSize = kindMapping.getCharacterBitsize(charTy.getFKind());
+ mlir::LLVM::DITypeAttr charTypeAttr = genBasicType(
+ context,
+ mlir::StringAttr::get(
+ context, "character(kind=" + llvm::Twine(charTy.getFKind()) + ")"),
----------------
abidh wrote:
Once https://github.com/llvm/llvm-project/pull/232259 is merged, you can also use the existing helper `getBasicTypeName`.
https://github.com/llvm/llvm-project/pull/231960
More information about the flang-commits
mailing list