[Lldb-commits] [PATCH] D105483: [LLDB] Testsuite: Add helper to check for AArch64 target

Muhammad Omair Javaid via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun Jul 11 20:53:51 PDT 2021


omjavaid added inline comments.


================
Comment at: lldb/packages/Python/lldbsuite/test/lldbtest.py:1296
+        """Returns true if the architecture is AArch64."""
+        return self.getArchitecture().lower() in ["aarch64"]
+
----------------
DavidSpickett wrote:
> omjavaid wrote:
> > DavidSpickett wrote:
> > > This can be:
> > > ```
> > > return self.getArchitecture().lower() == "aarch64"
> > > ```
> > > 
> > > Unless you're expecting "aarch64_be" or "aarch64_32" as well.
> > > ```
> > > return "aarch64" in self.getArchitecture().lower()
> > > ```
> > > 
> > > Not sure if lldb just has the single name.
> > This was intentional as I wanted to keep this helper checking for platform architecture regardless of ABI or endianess. For an ILP32 inferior or be inferior our Native* are same as normal aarch64.
> I still think
> ```
> return self.getArchitecture().lower() == "aarch64"
> ```
> Is the same thing unless you intend to expand the list.
> 
> (but I understand what you're doing and either way works just a bit less neat IMO)
Oh yes agreed, I dunno what I was thinking :) Let me fix this.


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

https://reviews.llvm.org/D105483



More information about the lldb-commits mailing list