[all-commits] [llvm/llvm-project] f3d753: [libc++] Fix abs and div overload issue for compil...

Jason Liu via All-commits all-commits at lists.llvm.org
Fri Apr 9 07:48:09 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f3d7536b24f1d65c09de4899a51d9fdda83c3b1d
      https://github.com/llvm/llvm-project/commit/f3d7536b24f1d65c09de4899a51d9fdda83c3b1d
  Author: jasonliu <jasonliu.development at gmail.com>
  Date:   2021-04-09 (Fri, 09 Apr 2021)

  Changed paths:
    M libcxx/include/cmath
    M libcxx/include/stdlib.h

  Log Message:
  -----------
  [libc++] Fix abs and div overload issue for compilers on AIX

Summary:
AIX system's stdlib.h provide different overload of abs and div
depending on compiler versions.

For example, std::div(long, long) and std::abs(long) are not available
from OS's stdlib.h when building with clang, but they are available
when building with xlclang compiler.

Therefore, we need to provide those extra overloads in libc++'s stdlib.h
when OS's stdlib.h does not.

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




More information about the All-commits mailing list