[PATCH] D144321: [PowerPC] Correctly use ELFv2 ABI on all OS's that use the ELFv2 ABI

Brad Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 18 17:15:56 PST 2023


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


================
Comment at: clang/lib/Basic/Targets/PPC.h:432
+          Triple.getOSMajorVersion() >= 13)) || Triple.isOSOpenBSD() ||
+          Triple.isMusl())
+        ABI = "elfv2";
----------------
dim wrote:
> clang-format seems to want to format the `if` as:
> 
> ```
>       if ((Triple.isOSFreeBSD() && (Triple.getOSVersion().empty() ||
>                                     Triple.getOSMajorVersion() >= 13)) ||
>           Triple.isOSOpenBSD() || Triple.isMusl())
> ```
> 
> E,g. it groups the whole FreeBSD expression together. I didn't know it could do this, but it seems relatively clear.
> clang-format seems to want to format the `if` as:
> 
> ```
>       if ((Triple.isOSFreeBSD() && (Triple.getOSVersion().empty() ||
>                                     Triple.getOSMajorVersion() >= 13)) ||
>           Triple.isOSOpenBSD() || Triple.isMusl())
> ```
> 
> E,g. it groups the whole FreeBSD expression together. I didn't know it could do this, but it seems relatively clear.

I can see both ways of doing things. I try to keep it as compact as possible. But I'll go with the suggested format.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144321



More information about the cfe-commits mailing list