[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 10:31:26 PST 2025
================
@@ -159,11 +159,16 @@ class SemaHLSL : public SemaBase {
// List of all resource bindings
ResourceBindings Bindings;
+ // default constant buffer $Globals
+ HLSLBufferDecl *DefaultCBuffer;
+
private:
void collectResourcesOnVarDecl(VarDecl *D);
void collectResourcesOnUserRecordDecl(const VarDecl *VD,
const RecordType *RT);
void processExplicitBindingsOnDecl(VarDecl *D);
+
+ void diagnoseAvailabilityViolations(TranslationUnitDecl *TU);
----------------
hekota wrote:
It used to be called directly from clang Sema. Now clang Sema calls HLSL Sema's `ActOnEndOfTranslationUnit` because we need to do more work at the end of translation unit. The `diagnoseAvailabilityViolations` is called from `SemaHLSL::ActOnEndOfTranslationUnit` so it can be private now.
https://github.com/llvm/llvm-project/pull/125807
More information about the llvm-branch-commits
mailing list