[PATCH] D122584: [DebugInfo] Use DW_ATE_signed encoding when creating a Fortran array index type.
John Reagan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 7 06:19:28 PDT 2022
JohnReagan added inline comments.
================
Comment at: llvm/include/llvm/BinaryFormat/Dwarf.h:324
+inline TypeKind getArrayIndexTypeEncoding(SourceLanguage S) {
+ return isFortran(S) ? DW_ATE_signed : DW_ATE_unsigned;
+}
----------------
I don't like picking the type encoding based on the language. Pascal also allows negative array bounds. The encoding should be derived from the type specified or from some additional attribute set by the frontend. I'll want this for my Pascal (and Fortran) compilers.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122584/new/
https://reviews.llvm.org/D122584
More information about the llvm-commits
mailing list