[llvm] [DebugInfo] Emit linkage name into DWARF for types for Swift (PR #112802)

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 21 14:24:36 PDT 2024


================
@@ -1849,8 +1847,20 @@ DIE *DWARFLinker::DIECloner::cloneDIE(const DWARFDie &InputDIE,
          RuntimeLang == dwarf::DW_LANG_ObjC_plus_plus) &&
         dwarf::toUnsigned(InputDIE.find(dwarf::DW_AT_APPLE_objc_complete_type))
             .value_or(0);
-    Unit.addTypeAccelerator(Die, AttrInfo.Name, ObjCClassIsImplementation,
-                            Hash);
+    if (Success && AttrInfo.Name && !AttrInfo.Name.getString().empty()) {
+      uint32_t Hash = hashFullyQualifiedName(InputDIE, Unit, File);
+      Unit.addTypeAccelerator(Die, AttrInfo.Name, ObjCClassIsImplementation,
+                              Hash);
+    }
+
+    if (Success && AttrInfo.MangledName &&
----------------
adrian-prantl wrote:

Can you add a short comment here explaining that Swift uses mangled type names ...?

https://github.com/llvm/llvm-project/pull/112802


More information about the llvm-commits mailing list