[Lldb-commits] [PATCH] D77326: 1/2: [nfc] [lldb] Unindent code

Shafik Yaghmour via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 2 14:39:05 PDT 2020


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





More information about the lldb-commits mailing list