[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 11:42:03 PST 2025


================
@@ -5072,6 +5080,20 @@ class HLSLBufferDecl final : public NamedDecl, public DeclContext {
     return static_cast<HLSLBufferDecl *>(const_cast<DeclContext *>(DC));
   }
 
+  // Iterator for the buffer decls. Concatenates the list of decls parented
----------------
hekota wrote:

That is correct. We are not depending on the order, but I like to put default buffer decls first and the children decls second because the children decls will include an implicit buffer layout struct decl that is created last. I will update the comment to make it clearer. 

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


More information about the llvm-branch-commits mailing list