llvm-project/clang/lib
Yaxun (Sam) Liu e5eb365069 [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
2022-03-04 15:56:54 -05:00
..
APINotes [clang][APINotes] Fix -Wunused-function warning (NFC) 2021-04-01 09:52:43 +08:00
ARCMigrate [clang] Use true/false instead of 1/0 (NFC) 2022-01-09 00:19:47 -08:00
AST [AST] Print NTTP args as string-literals when possible 2022-03-01 19:34:27 -06:00
ASTMatchers Add `isConstinit` matcher 2022-01-24 08:35:42 -05:00
Analysis [clang][dataflow] Add a lattice to track source locations. 2022-03-04 17:13:24 +00:00
Basic [AMDGPU] Add gfx1036 target 2022-03-02 23:26:38 +00:00
CodeGen [NFC][Clang][OpaquePtr] Remove calls to Address::deprecated in 2022-03-03 08:54:46 -08:00
CrossTU Revert "[analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file" 2021-12-16 20:46:51 -05:00
DirectoryWatcher [clang] [DirectoryWatcher] Remove leading \\?\ from GetFinalPathNameByHandleW 2021-11-08 22:21:30 +02:00
Driver [CUDA][HIP] Fix offloading kind for linking C++ programs 2022-03-04 15:56:54 -05:00
Edit [clang] Use true/false instead of 1/0 (NFC) 2022-01-09 00:19:47 -08:00
Format [clang-format] Handle wrapped else for RemoveBracesLLVM 2022-03-03 04:53:15 -08:00
Frontend [clang] Improve laziness of resolving module map headers. 2022-03-01 15:56:23 +01:00
FrontendTool [clang] Add an extract-api driver option 2022-01-26 11:31:12 -08:00
Headers [NVPTX] Fix nvvm.match.sync*.i64 intrinsics return type (i64 -> i32) 2022-03-01 12:26:16 +02:00
Index [clang] Visit enum base specifiers in libIndex 2021-10-25 13:16:14 +02:00
IndexSerialization
Interpreter [C++20][Modules][1/8] Track valid import state. 2022-02-21 09:09:37 +00:00
Lex [PS4] isPS4 and isPS4CPU are not meaningfully different 2022-03-03 11:36:59 -05:00
Parse [NFC] [C++20] [Modules] Simplify ActOnModuleImport by merging Path and Parition 2022-03-02 23:06:36 +08:00
Rewrite Add assert on End iteration distance to Rewriter::getRewrittenText. 2022-01-25 17:26:13 +00:00
Sema [clang] [concepts] Check constrained-auto return types for void-returning functions 2022-03-04 12:43:06 -05:00
Serialization [clang] Improve laziness of resolving module map headers. 2022-03-01 15:56:23 +01:00
StaticAnalyzer [analyzer] Done some changes to detect Uninitialized read by the char array manipulation functions 2022-03-04 00:21:06 +05:30
Testing
Tooling [pseudo] Fix an out-of-bound access for LRTable::Actions. 2022-03-03 14:27:44 +01:00
CMakeLists.txt [clang-repl] Recommit "Land initial infrastructure for incremental parsing" 2021-05-13 06:30:29 +00:00