================
@@ -621,7 +621,10 @@ std::optional<uint64_t> 
DWARFDebugNames::Entry::getCUIndex() const {
   if (std::optional<DWARFFormValue> Off = lookup(dwarf::DW_IDX_compile_unit))
     return Off->getAsUnsignedConstant();
   // In a per-CU index, the entries without a DW_IDX_compile_unit attribute
-  // implicitly refer to the single CU.
+  // implicitly refer to the single CU, but only if we don't have a
----------------
clayborg wrote:

We only return 0 if this DebugName::Entry doesn't have a `DW_IDX_type_unit` and 
if there is no valid CU index from a `DW_IDX_compile_unit `. The code is 
correct.

https://github.com/llvm/llvm-project/pull/72952
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to