[clang] [SYCL][SPIR-V][Windows] Extend BaseSPIRTargetInfo host-adaptation for Windows support (PR #208196)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 28 14:47:29 PDT 2026
================
@@ -272,8 +284,10 @@ class LLVM_LIBRARY_VISIBILITY SPIR32TargetInfo : public SPIRTargetInfo {
assert(Triple.getArch() == llvm::Triple::spir &&
"Invalid architecture for 32-bit SPIR.");
PointerWidth = PointerAlign = 32;
- SizeType = TargetInfo::UnsignedInt;
- PtrDiffType = IntPtrType = TargetInfo::SignedInt;
+ if (!HostTarget || HostTarget->getPointerWidth(LangAS::Default) != 32) {
+ SizeType = TargetInfo::UnsignedInt;
+ PtrDiffType = IntPtrType = TargetInfo::SignedInt;
+ }
----------------
schittir wrote:
Makes sense. Thanks!
https://github.com/llvm/llvm-project/pull/208196
More information about the cfe-commits
mailing list