[Lldb-commits] [lldb] [lldb] Tolerate multiple compile units with the same DWO ID (PR #100577)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 25 15:40:07 PDT 2024
================
@@ -718,13 +720,11 @@ DWARFCompileUnit *DWARFUnit::GetSkeletonUnit() {
return llvm::dyn_cast_or_null<DWARFCompileUnit>(m_skeleton_unit);
}
-void DWARFUnit::SetSkeletonUnit(DWARFUnit *skeleton_unit) {
- // If someone is re-setting the skeleton compile unit backlink, make sure
- // it is setting it to a valid value when it wasn't valid, or if the
- // value in m_skeleton_unit was valid, it should be the same value.
- assert(skeleton_unit);
- assert(m_skeleton_unit == nullptr || m_skeleton_unit == skeleton_unit);
- m_skeleton_unit = skeleton_unit;
+bool DWARFUnit::LinkToSkeletonUnit(DWARFUnit &skeleton_unit) {
----------------
clayborg wrote:
No real reason to pass in a reference here since we want the pointer. The call of this function is calling with `dwo_cu->LinkToSkeletonUnit(*this)`. Can we change `DWARFUnit &skeleton_unit` back to `DWARFUnit *skeleton_unit`?
https://github.com/llvm/llvm-project/pull/100577
More information about the lldb-commits
mailing list