aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
authorJoseph Huber <35342157+jhuber6@users.noreply.github.com>2023-10-06 21:50:35 -0500
committerGitHub <noreply@github.com>2023-10-06 21:50:35 -0500
commitfa23a2396b6c8d64c3acc47223459ecb75938391 (patch)
treeeac5977aa83605de6a95b87600037d1b718d7f5a /clang/lib/Lex/Preprocessor.cpp
parent869d1680edb0cc264f01fc6e59f0a1b93330c6da (diff)
downloadllvm-fa23a2396b6c8d64c3acc47223459ecb75938391.zip
llvm-fa23a2396b6c8d64c3acc47223459ecb75938391.tar.gz
llvm-fa23a2396b6c8d64c3acc47223459ecb75938391.tar.bz2
[libc] Fix linking of AMDGPU device runtime control constants for math (#65676)
Summary: Currently, `libc` temporarily provides math by linking against existing vendor implementations. To use the AMDGPU DeviceRTL we need to define a handful of control constants that alter behaviour for architecture specific things. Previously these were marked `extern const` because they must be present when we link-in the vendor bitcode library. However, this causes linker errors if more than one math function was used. This patch fixes the issue by marking these functions as used and inline on top of being external. This means that they are linkable, but it gives us `linkonce_odr` semantics. The downside is that these globals won't be optimized out, but it allows us to perform constant propagation on them unlike using `weak`.
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
0 files changed, 0 insertions, 0 deletions