[Lldb-commits] [lldb] [lldb][Fortran] Added support for basic types in TypeSystemFortran (PR #223380)
Iasonas Karaprodromidis via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 7 04:38:49 PDT 2026
================
@@ -58,6 +61,247 @@ LanguageSet TypeSystemFortran::GetSupportedLanguagesForExpressions() {
return GetSupportedLanguagesForTypes();
}
+#ifndef NDEBUG
+bool TypeSystemFortran::Verify(lldb::opaque_compiler_type_t type) {
+ return !type || llvm::isa<FortranType>(static_cast<FortranType *>(type));
+}
+#endif
+
+bool TypeSystemFortran::IsFloatingPointType(opaque_compiler_type_t type) {
+ if (!type)
+ return false;
+ int kind = static_cast<FortranType *>(type)->GetKind();
+
+ if (kind == FortranType::KIND_REAL || kind == FortranType::KIND_COMPLEX)
+ return true;
+
+ return false;
+}
+
+bool TypeSystemFortran::IsIntegerType(opaque_compiler_type_t type,
+ bool &is_signed) {
+ if (!type)
+ return false;
+ int kind = static_cast<FortranType *>(type)->GetKind();
+ if (kind == FortranType::KIND_INTEGER || kind == FortranType::KIND_UNSIGNED) {
+ is_signed = (kind == FortranType::KIND_INTEGER);
----------------
Iasonaskrpr wrote:
We can just leave it as is if it is not an integer, that is what TypeSystemClang does also.
https://github.com/llvm/llvm-project/pull/223380
More information about the lldb-commits
mailing list