[Lldb-commits] [lldb] [lldb] Tolerate multiple compile units with the same DWO ID (PR #100577)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Fri Jul 26 01:55:42 PDT 2024


================
@@ -170,7 +170,7 @@ class DWARFUnit : public UserID {
   /// both cases correctly and avoids crashes.
   DWARFCompileUnit *GetSkeletonUnit();
 
-  void SetSkeletonUnit(DWARFUnit *skeleton_unit);
+  bool LinkToSkeletonUnit(DWARFUnit &skeleton_unit);
----------------
labath wrote:

It just seemed to me like `Set` does not capture very well the new semantics of the function (a typical setter function just sets the corresponding field and does not second-guess the callers intentions). A nice side benefit is that we can be sure to catch all callers of the api to make sure they're not silently ignoring the result.

 I can revert it if you feel strongly about it.

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


More information about the lldb-commits mailing list