[clang] [HLSL] Add `[[hlsl::row_access]]` attribute (PR #107954)
Justin Bogner via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 10 12:19:21 PDT 2024
================
@@ -6169,9 +6169,13 @@ class HLSLAttributedResourceType : public Type, public llvm::FoldingSetNode {
// Data gathered from HLSL resource attributes
llvm::dxil::ResourceClass ResourceClass;
uint8_t IsROV : 1;
- Attributes(llvm::dxil::ResourceClass ResourceClass, bool IsROV)
- : ResourceClass(ResourceClass), IsROV(IsROV) {}
- Attributes() : ResourceClass(llvm::dxil::ResourceClass::UAV), IsROV(0) {}
+ uint8_t RowAccess : 1;
----------------
bogner wrote:
It's probably worth putting `LLVM_PREFERRED_TYPE(bool)` on these. This is [[[clang::preferred_type]]](https://clang.llvm.org/docs/AttributeReference.html#preferred-type) on compilers that support it and mostly just improves the debugging experience.
https://github.com/llvm/llvm-project/pull/107954
More information about the cfe-commits
mailing list