[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

Cassandra Beckley via cfe-commits cfe-commits at lists.llvm.org
Tue May 6 16:38:25 PDT 2025


================
@@ -877,6 +878,11 @@ bool CodeGenTypes::isZeroInitializable(QualType T) {
   if (const MemberPointerType *MPT = T->getAs<MemberPointerType>())
     return getCXXABI().isZeroInitializable(MPT);
 
+  // HLSL Inline SPIR-V types are non-zero-initializable.
+  if (T->getAs<HLSLInlineSpirvType>()) {
+    return false;
+  }
----------------
cassiebeckley wrote:

Done.

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


More information about the cfe-commits mailing list