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

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


[ROCm/hip commit: 3f2eefa82a]
This commit is contained in:
Evgeny Mankov
2019-10-29 19:42:53 +03:00
parent 7310e182ad
commit 0fd46e00cb
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();