[llvm-branch-commits] [clang] [HLSL] Implement default constant buffer `$Globals` (PR #125807)

Helena Kotas via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Feb 18 12:44:21 PST 2025


================
@@ -286,10 +286,7 @@ void CGHLSLRuntime::emitBufferGlobalsAndMetadata(const HLSLBufferDecl *BufDecl,
                                   .str()))) &&
            "layout type does not match the converted element type");
 
-    // there might be resources inside the used defined structs
-    if (VDTy->isStructureType() && VDTy->isHLSLIntangibleType())
-      // FIXME: handle resources in cbuffer structs
-      llvm_unreachable("resources in cbuffer are not supported yet");
+    // FIXME: handle resources in cbuffer user-defined structs
----------------
hekota wrote:

Yes, this is a future work (llvm/wg-hlsl#175). I've removed the `llvm_unreachable` because we use it in existing tests.

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


More information about the llvm-branch-commits mailing list