================ @@ -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 ---------------- jeffreytan81 wrote:
I wonder why do we really need this check? With this check, when there is no `DW_IDX_compile_unit` but `DW_IDX_type_unit` presents, `getCUIndex` will return `nullopt`. Per my understanding, this is split dwarf (per-CU index) + TU scenario which we should return `0` instead of `nulptr`, right? 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