[all-commits] [llvm/llvm-project] 230236: [libc++] Replace __ppc64__ with __powerpc64__ and ...

Fangrui Song via All-commits all-commits at lists.llvm.org
Tue Nov 22 13:33:48 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 23023654be6c3c77a2a90611d19ea76788492704
      https://github.com/llvm/llvm-project/commit/23023654be6c3c77a2a90611d19ea76788492704
  Author: Fangrui Song <i at maskray.me>
  Date:   2022-11-22 (Tue, 22 Nov 2022)

  Changed paths:
    M libcxx/include/limits
    M libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_iec559.pass.cpp
    M libcxx/test/std/utilities/meta/meta.unary.prop.query/alignment_of.pass.cpp

  Log Message:
  -----------
  [libc++] Replace __ppc64__ with __powerpc64__ and fix is_iec559 for non-ibm128

The lowercase `__ppc64__` is not defined by non-darwin powerpc64 GCC, therefore
it lures users to write code which is not portable to GCC. Migrate to
`__powerpc64__` in preparation for undefining `__ppc64__`. `__powerpc64__` is
much more common than `__PPC64__`.

Update alignment_of.pass.cpp to use 1 unconditionally:
on powerpc-unknown-linux-gnu `alignof(bool) = _Alignof(bool) = __alignof(bool) = 1`.
The value 4 might be derived from an ancient Clang.

Change is_iec559 to true when long double uses uses IEEE 754 quadruple or double
precision (i.e. not ibm128).

Reviewed By: #libc, thesamesam, ldionne

Differential Revision: https://reviews.llvm.org/D137513




More information about the All-commits mailing list