[clang] [clang] Check validity of SYCL device target (PR #172366)
Mariya Podchishchaeva via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 29 08:08:21 PDT 2026
================
@@ -118,6 +118,12 @@ bool CompilerInstance::createTarget() {
if (!hasTarget())
return false;
+ if (getLangOpts().SYCLIsDevice && !getTarget().isValidSYCLDeviceTarget()) {
----------------
Fznamznon wrote:
> I could modify isGPU() to include spir but I am not sure if that is functionally correct. Would you know?
I've seen this TODO https://github.com/llvm/llvm-project/blob/6238ce14a8f28246c4dc5775165bd04200005559/clang/lib/Sema/SemaDeclAttr.cpp#L5538
so that is probably fine.
https://github.com/llvm/llvm-project/pull/172366
More information about the cfe-commits
mailing list