[llvm-branch-commits] [lldb] [lldb][Fortran] Added support for functions to DWARFASTParserFortran (PR #234312)
David Spickett via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Oct 23 06:56:11 PDT 2026
================
@@ -146,13 +177,61 @@ lldb::TypeSP DWARFASTParserFortran::ParseTypeFromDWARF(
compiler_type, Type::ResolveState::Full);
break;
}
+ case DW_TAG_subprogram:
+ case DW_TAG_subroutine_type: {
+ CompilerType return_type;
+ dwarf->GetDIEToType()[die.GetDIE()] = DIE_IS_BEING_PARSED;
+ attributes = die.GetAttributes();
+ size_t num_attr = attributes.Size();
+
+ for (size_t i = 0; i < num_attr; ++i) {
+ if (attributes.ExtractFormValueAtIndex(i, form_value)) {
+ switch (attributes.AttributeAtIndex(i)) {
+ case DW_AT_name:
+ type_name_cstr = form_value.AsCString();
+ if (type_name_cstr &&
+ type_name_cstr[0]) { // Check for null AND empty string
+ type_name.SetString(llvm::StringRef(type_name_cstr));
----------------
DavidSpickett wrote:
I suspect you don't need llvm::StringRef here and the compiler will figure out what to do.
https://github.com/llvm/llvm-project/pull/234312
More information about the llvm-branch-commits
mailing list