[Lldb-commits] [PATCH] D110619: [lldb] [DynamicRegisterInfo] Refactor SetRegisterInfo()

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 28 04:21:41 PDT 2021


labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.

wow



================
Comment at: lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp:244
+              ? ByteOffsetFromSlice(i, slice_str, byte_order)
+          : reg_info_dict->GetValueForKeyAsArray("composite",
+                                                 composite_reg_list)
----------------
mgorny wrote:
> clang-format seems to indent this weirdly.
I can't say I blame it. :)

Maybe make this a separate function too, so you can use ifs and returns ?


================
Comment at: lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp:252-253
+
+      LLDB_LOG_ERROR(log, byte_offset.takeError(),
+                     "error while parsing register {1}: {0}", reg_info.name);
+      if (byte_offset)
----------------
I think this would look better in the else branch below.


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

https://reviews.llvm.org/D110619



More information about the lldb-commits mailing list