aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2019-04-23 18:01:58 +0000
committerEric Fiselier <eric@efcs.ca>2019-04-23 18:01:58 +0000
commit1670772adc0ebe647aa8cda20e0b7dada3cf3e85 (patch)
treebc4e351667cbe843abdc4ada4345e055df5a430a /llvm/lib/CodeGen/MachineFunction.cpp
parentf945429fed52bc7c182d5b38469a41ab5eea03a2 (diff)
downloadllvm-1670772adc0ebe647aa8cda20e0b7dada3cf3e85.zip
llvm-1670772adc0ebe647aa8cda20e0b7dada3cf3e85.tar.gz
llvm-1670772adc0ebe647aa8cda20e0b7dada3cf3e85.tar.bz2
Fix implementation of ::abs and std::abs LWG 2192.
Summary: All overloads of `::abs` and `std::abs` must be present in both `<cmath>` and `<cstdlib>`. This is problematic to implement because C defines `fabs` in `math.h` and `labs` in `stdlib.h`. This introduces a circular dependency between the two headers. This patch implements that requirement by moving `abs` into `math.h` and making `stdlib.h` include `math.h`. In order to get the underlying C declarations from the "real" `stdlib.h` inside our `math.h` we need some trickery. Specifically we need to make `stdlib.h` include next itself. Suggestions for a cleaner implementation are welcome. Reviewers: mclow.lists, ldionne Reviewed By: ldionne Subscribers: krytarowski, fedor.sergeev, dexonsmith, jdoerfert, jsji, libcxx-commits Differential Revision: https://reviews.llvm.org/D60097 llvm-svn: 359020
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions