aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorYaxun (Sam) Liu <yaxun.liu@amd.com>2022-03-03 09:01:46 -0500
committerYaxun (Sam) Liu <yaxun.liu@amd.com>2022-03-04 15:56:54 -0500
commite5eb365069cce7bb642421d53a1d3964f8d5bdb7 (patch)
tree6747e7b60b9cf4291ca108a0817e0c1b7522aa3d /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent9bd72b5c258549b8743557a79c7929de38f05a6d (diff)
downloadllvm-e5eb365069cce7bb642421d53a1d3964f8d5bdb7.zip
llvm-e5eb365069cce7bb642421d53a1d3964f8d5bdb7.tar.gz
llvm-e5eb365069cce7bb642421d53a1d3964f8d5bdb7.tar.bz2
[CUDA][HIP] Fix offloading kind for linking C++ programs
When both CUDA or HIP programs and C++ programs are passed to clang driver without -c, C++ programs are treated as CUDA or HIP program, which is incorrect. This is because action builder sets the offloading kind of input job actions to the linking action to be the union of offloading kind of the input job actions, i.e. if there is one HIP or CUDA input to the linker, then all the input to the linker is marked as HIP or CUDA. To fix this issue, the offload action builder tracks the originating input argument of each host action, which allows it to determine the active offload kind of each host action. Then the offload kind of each input action to the linker can be determined individually. Reviewed by: Artem Belevich Differential Revision: https://reviews.llvm.org/D120911
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions