[Lldb-commits] [PATCH] D120810: [lldb] Remove the global platform list

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 2 10:28:46 PST 2022


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

It's always great to see changes that enable more testing. I left one inline comment/nit but besides that this LGTM.



================
Comment at: lldb/source/Target/Platform.cpp:1891
+
+PlatformSP PlatformList::GetOrCreate(const ArchSpec &arch,
+                                     ArchSpec *platform_arch_ptr,
----------------
[Nit/pedantic] We have a few calls to `IsCompatibleArchitecture` in this function. Based on the existing comments you can infer that that's what the second argument is for. Normally I'd suggest an inline comment, but given the that there's a bunch of calls, could we have either have two constants:

```
enum ArchMatch : bool {
  ExactArchMatch = true,
  CompatibleArchMatch = false,
};
```

Or maybe even better, can we change the signature of that function to take an enum with those values? 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120810



More information about the lldb-commits mailing list