diff options
author | Helena Kotas <hekotas@microsoft.com> | 2025-02-20 17:27:53 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-20 17:27:53 -0800 |
commit | 776cddacb1ab8fd92bcb3aa42f9c0b348d8aa2ba (patch) | |
tree | 48c9953fed0269349e213deefa1171de7af3d292 /clang/lib/Sema/Sema.cpp | |
parent | 9fa77c18548a4878cf53a5195f69d15a2d1d567f (diff) | |
download | llvm-776cddacb1ab8fd92bcb3aa42f9c0b348d8aa2ba.zip llvm-776cddacb1ab8fd92bcb3aa42f9c0b348d8aa2ba.tar.gz llvm-776cddacb1ab8fd92bcb3aa42f9c0b348d8aa2ba.tar.bz2 |
[HLSL] Implement default constant buffer `$Globals` (#125807)
All variable declarations in the global scope that are not resources,
static or empty are implicitly added to implicit constant buffer
`$Globals`. They are created in `hlsl_constant` address space and
collected in an implicit `HLSLBufferDecl` node that is added to the AST
at the end of the translation unit. Codegen is the same as for explicit
constant buffers.
Fixes #123801
Diffstat (limited to 'clang/lib/Sema/Sema.cpp')
-rw-r--r-- | clang/lib/Sema/Sema.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp index 145cda6..c699e92 100644 --- a/clang/lib/Sema/Sema.cpp +++ b/clang/lib/Sema/Sema.cpp @@ -1417,8 +1417,7 @@ void Sema::ActOnEndOfTranslationUnit() { } if (LangOpts.HLSL) - HLSL().DiagnoseAvailabilityViolations( - getASTContext().getTranslationUnitDecl()); + HLSL().ActOnEndOfTranslationUnit(getASTContext().getTranslationUnitDecl()); // If there were errors, disable 'unused' warnings since they will mostly be // noise. Don't warn for a use from a module: either we should warn on all |