================
@@ -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
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to