[Lldb-commits] [lldb] 2fcade9 - [lldb] Replace radars link with documenting comment (NFC)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Sun Jul 30 15:17:26 PDT 2023


Author: Jonas Devlieghere
Date: 2023-07-30T15:17:16-07:00
New Revision: 2fcade935aa42d1d750f826b431961b6fafb86b7

URL: https://github.com/llvm/llvm-project/commit/2fcade935aa42d1d750f826b431961b6fafb86b7
DIFF: https://github.com/llvm/llvm-project/commit/2fcade935aa42d1d750f826b431961b6fafb86b7.diff

LOG: [lldb] Replace radars link with documenting comment (NFC)

This replaces two radar links with improved comments explaining the
underlying issues.

 - The first issue is working around a compiler bug that was fixed in
   f454dfb6b5af.
 - The second issue is an invariant that doesn't actually hold. The
   latter was marked as FIXME but there was nothing in the radar about a
   possible alternative solution.

Both radars were closed.

Added: 
    

Modified: 
    lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
index a3ade51e1fe5b4..2dd61ee219e1e4 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -1171,16 +1171,17 @@ TypeSP DWARFASTParserClang::ParseSubroutine(const DWARFDIE &die,
                 class_type->GetFullCompilerType();
 
                 // The type for this DIE should have been filled in the
-                // function call above
+                // function call above.
                 Type *type_ptr = dwarf->GetDIEToType()[die.GetDIE()];
                 if (type_ptr && type_ptr != DIE_IS_BEING_PARSED) {
                   return type_ptr->shared_from_this();
                 }
 
-                // FIXME This is fixing some even uglier behavior but we
-                // really need to
-                // uniq the methods of each class as well as the class
-                // itself. <rdar://problem/11240464>
+                // The previous comment isn't actually true if the class wasn't
+                // resolved using the current method's parent DIE as source
+                // data. We need to ensure that we look up the method correctly
+                // in the class and then link the method's DIE to the unique
+                // CXXMethodDecl appropriately.
                 type_handled = true;
               }
             }
@@ -2950,12 +2951,10 @@ void DWARFASTParserClang::ParseSingleMember(
     member_clang_type.GetCompleteType();
 
   {
-    // Older versions of clang emit array[0] and array[1] in the
-    // same way (<rdar://problem/12566646>). If the current field
-    // is at the end of the structure, then there is definitely no
-    // room for extra elements and we override the type to
-    // array[0].
-
+    // Older versions of clang emit the same DWARF for array[0] and array[1]. If
+    // the current field is at the end of the structure, then there is
+    // definitely no room for extra elements and we override the type to
+    // array[0]. This was fixed by f454dfb6b5af.
     CompilerType member_array_element_type;
     uint64_t member_array_size;
     bool member_array_is_incomplete;


        


More information about the lldb-commits mailing list