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

* LLVM < 9 continues using --cuda-host-only
This commit is contained in:
Evgeny Mankov
2019-10-29 19:42:53 +03:00
parent 50df94be1e
commit 411b18a124
3 changed files with 15 additions and 1 deletions
+8
View File
@@ -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();