shafik added a comment.

I feel like this should have been split in two. It feels like there are 
straight forward obviously correct changes and a several others that require 
some thinking about but look correct.



================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp:524
   DIEInfoArray die_info_array;
-  if (FindByName(name, die_info_array))
-    DWARFMappedHash::ExtractDIEArray(die_info_array, die_offsets);
+  FindByName(name, die_info_array);
+  DWARFMappedHash::ExtractDIEArray(die_info_array, die_offsets);
----------------
jankratochvil wrote:
> kwk wrote:
> > Why is the `if` no longer needed?
> It will now run `DWARFMappedHash::ExtractDIEArray` on empty array which is 
> cheap, it does nothing.
If we stick with this change, please add a comment explaining this. It is not 
obvious and someone later on may come and change it back thinking this is a bug.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77326



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

Reply via email to