[clang] [clang] Check validity of SYCL device target (PR #172366)

Mariya Podchishchaeva via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 28 05:32:10 PDT 2026


================
@@ -118,6 +118,12 @@ bool CompilerInstance::createTarget() {
   if (!hasTarget())
     return false;
 
+  if (getLangOpts().SYCLIsDevice && !getTarget().isValidSYCLDeviceTarget()) {
----------------
Fznamznon wrote:

I recently discovered there is Triple::isGPU() added by 48b753027382a5815295d6680c7dd407be936c86 . Should we reuse it instead of adding `isValidSYCLDeviceTarget`?

https://github.com/llvm/llvm-project/pull/172366


More information about the cfe-commits mailing list