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

Jan Kratochvil via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 3 11:55:15 PDT 2020


jankratochvil marked 2 inline comments as done.
jankratochvil added inline comments.


================
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);
----------------
shafik wrote:
> 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.
I have rather dropped this part of this refactorization patch. It will look more logical together with changes of the next part D77327. Thanks for the comments.



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