[HIPIFY] Introduce --cuda-compile-host-device for LLVM >= 9

* LLVM < 9 continues using --cuda-host-only


[ROCm/clr commit: 411b18a124]
This commit is contained in:
Evgeny Mankov
2019-10-29 19:42:53 +03:00
parent 532e8138d5
commit 21d798394a
3 changed files with 15 additions and 1 deletions
@@ -127,6 +127,14 @@ bool pragma_once_outside_header() {
#endif
}
bool canCompileHostAndDeviceInOneJob() {
#if LLVM_VERSION_MAJOR < 9
return false;
#else
return true;
#endif
}
void RetainExcludedConditionalBlocks(clang::CompilerInstance &CI) {
#if LLVM_VERSION_MAJOR > 9
clang::PreprocessorOptions &PPOpts = CI.getPreprocessorOpts();