aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/OptimizedStructLayout.cpp
diff options
context:
space:
mode:
authorJohannes Doerfert <johannes@jdoerfert.de>2020-04-09 22:10:16 -0500
committerJohannes Doerfert <johannes@jdoerfert.de>2020-04-09 22:10:31 -0500
commit17d83342235f01d4b110dc5d4664fe96f6597f11 (patch)
tree45c5560414f7a646130169a34f8c9e2652a4753c /llvm/lib/Support/OptimizedStructLayout.cpp
parent03ff643d2e9ebbf319d71b3a17d2ed0320a6a25b (diff)
downloadllvm-17d83342235f01d4b110dc5d4664fe96f6597f11.zip
llvm-17d83342235f01d4b110dc5d4664fe96f6597f11.tar.gz
llvm-17d83342235f01d4b110dc5d4664fe96f6597f11.tar.bz2
[OpenMP] Allow <math.h> to go first in C++-mode in target regions
If we are in C++ mode and include <math.h> (not <cmath>) first, we still need to make sure <cmath> is read first. The problem otherwise is that we haven't seen the declarations of the math.h functions when the system math.h includes our cmath overlay. However, our cmath overlay, or better the underlying overlay, e.g. CUDA, uses the math.h functions. Since we haven't declared them yet we get errors. CUDA avoids this by eagerly declaring all math functions (in the __device__ space) but we cannot do this. Instead we break the dependence by forcing cmath to go first. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D77774
Diffstat (limited to 'llvm/lib/Support/OptimizedStructLayout.cpp')
0 files changed, 0 insertions, 0 deletions