[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:23:10 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);
+ return true;
+ }
+
+ return false;
+}
+
bool TypeSystemFortran::SupportsLanguage(lldb::LanguageType language) {
return Language::LanguageIsFortran(language);
}
+
+/// Returns the type name upper-cased to follow Fortran's general style.
+ConstString TypeSystemFortran::GetTypeName(opaque_compiler_type_t type,
+ bool BaseOnly) {
----------------
Iasonaskrpr wrote:
This is the name used from the base TypeSystem class. Maybe it is a mistake since following the rest of this TypeSystem's coding style it would be `base_only`. I will open a PR for it and change it to snake case.
https://github.com/llvm/llvm-project/pull/223380
More information about the lldb-commits
mailing list