[Lldb-commits] [PATCH] D113155: [lldb] Remove nested switches from ARMGetSupportedArchitectureAtIndex (NFC)

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 3 17:33:45 PDT 2021


JDevlieghere created this revision.
JDevlieghere added reviewers: friss, jasonmolenda.
Herald added subscribers: arphaman, kristof.beyls.
JDevlieghere requested review of this revision.

Remove the nested switches from the ARMGetSupportedArchitectureAtIndex implementation. I considered a few alternatives, like changing the API (too intrusive) and trying to be clever by manipulating indexes (too hard to maintain). I'm not happy about the remaining amount of duplication, but it seemed like the best tradeoff.


https://reviews.llvm.org/D113155

Files:
  lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
  lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
  lldb/unittests/Platform/PlatformDarwinTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113155.384619.patch
Type: text/x-patch
Size: 26019 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20211104/d530495d/attachment-0001.bin>


More information about the lldb-commits mailing list