[clang] [SYCL][SPIR-V] Implement fix for Windows/MSVC SPIR-V device target support (PR #208196)

via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 12 14:13:33 PDT 2026


================
@@ -164,6 +164,18 @@ class LLVM_LIBRARY_VISIBILITY BaseSPIRTargetInfo : public TargetInfo {
       UseExplicitBitFieldAlignment = HostTarget->useExplicitBitFieldAlignment();
       ZeroLengthBitfieldBoundary = HostTarget->getZeroLengthBitfieldBoundary();
 
+      // Copy pointer-related type representations from host so that
+      // sizeof(size_t), sizeof(ptrdiff_t), sizeof(intptr_t) match
+      // between host and device. Without this, LLP64 hosts (Windows)
+      // get incorrect LP64-style defaults.
+      SizeType = HostTarget->getSizeType();
+      PtrDiffType = HostTarget->getPtrDiffType(LangAS::Default);
+      IntPtrType = HostTarget->getIntPtrType();
+
+      // Inherit Microsoft C mangling if the host uses it.
+      if (HostTarget->shouldUseMicrosoftCCforMangling())
+        UseMicrosoftManglingForC = true;
----------------
schittir wrote:

Removing this change and additing a note in the commit message. 

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


More information about the cfe-commits mailing list