[Lldb-commits] [lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

David Blaikie via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 12 14:35:40 PDT 2024


================
@@ -48,15 +60,31 @@ DebugNamesDWARFIndex::GetUnits(const DebugNames &debug_names) {
   return result;
 }
 
+DWARFTypeUnit *
+DebugNamesDWARFIndex::GetForeignTypeUnit(const DebugNames::Entry &entry) const {
+  std::optional<uint64_t> type_sig = entry.getForeignTUTypeSignature();
+  if (type_sig)
+    if (auto dwp_sp = m_debug_info.GetDwpSymbolFile())
----------------
dwblaikie wrote:

this `auto` should probably be const ref, to avoid inc/dec on the ref counted smart pointer's ref count

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


More information about the lldb-commits mailing list