kimanh added inline comments.

================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp:82
 
+  const DWARFUnit &non_skeleton_cu = cu.GetNonSkeletonUnit();
   DWARFMappedHash::DIEInfoArray hash_data;
----------------
JDevlieghere wrote:
> I assume the `const` of the `DWARFUnit` is being dropped because 
> `GetNonSkeletonUnit`? Rather than doing that, can't that function be const 
> instead? 
Yes correct. I agree with your point that dropping `const` here is not very 
nice, but I'm not sure whether we can make that function const easily. 
As is `GetNonSkeletonUnit` is updating itself in `ExtractUnitDIEIfNeeded()`, 
which kicks off many non-const operations for updating itself. As far as I 
understand, if we would want to make it const, we'd need to change the 
architectural logic in how the skeleton and non-skeleton units are connected. 
I'm not very familiar with the code base, so any advice here is welcome!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106270/new/

https://reviews.llvm.org/D106270

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to