aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorYaxun (Sam) Liu <yaxun.liu@amd.com>2020-04-24 16:41:24 -0400
committerYaxun (Sam) Liu <yaxun.liu@amd.com>2020-05-12 08:27:50 -0400
commite03394c6a6ff5832aa43259d4b8345f40ca6a22c (patch)
tree3b327b64ef9abddc3fc6a43fd9a1e298ef1eae9c /clang/lib/Frontend/CompilerInvocation.cpp
parentf1f8cffce49fe56817e25f648b29e1a8cfcfac8a (diff)
downloadllvm-e03394c6a6ff5832aa43259d4b8345f40ca6a22c.zip
llvm-e03394c6a6ff5832aa43259d4b8345f40ca6a22c.tar.gz
llvm-e03394c6a6ff5832aa43259d4b8345f40ca6a22c.tar.bz2
[CUDA][HIP] Workaround for resolving host device function against wrong-sided function
recommit c77a4078e01033aa2206c31a579d217c8a07569b with fix https://reviews.llvm.org/D77954 caused regressions due to diagnostics in implicit host device functions. For now, it seems the most feasible workaround is to treat implicit host device function and explicit host device function differently. Basically in device compilation for implicit host device functions, keep the old behavior, i.e. give host device candidates and wrong-sided candidates equal preference. For explicit host device functions, favor host device candidates against wrong-sided candidates. The rationale is that explicit host device functions are blessed by the user to be valid host device functions, that is, they should not cause diagnostics in both host and device compilation. If diagnostics occur, user is able to fix them. However, there is no guarantee that implicit host device function can be compiled in device compilation, therefore we need to preserve its overloading resolution in device compilation. Differential Revision: https://reviews.llvm.org/D79526
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions