================ @@ -6168,10 +6168,19 @@ class HLSLAttributedResourceType : public Type, public llvm::FoldingSetNode { struct Attributes { // Data gathered from HLSL resource attributes llvm::dxil::ResourceClass ResourceClass; + + LLVM_PREFERRED_TYPE(bool) uint8_t IsROV : 1; - Attributes(llvm::dxil::ResourceClass ResourceClass, bool IsROV) - : ResourceClass(ResourceClass), IsROV(IsROV) {} - Attributes() : ResourceClass(llvm::dxil::ResourceClass::UAV), IsROV(0) {} + + LLVM_PREFERRED_TYPE(bool) + uint8_t RawBuffer : 1; + + Attributes(llvm::dxil::ResourceClass ResourceClass, bool IsROV, + bool RawBuffer) + : ResourceClass(ResourceClass), IsROV(IsROV), RawBuffer(RawBuffer) {} + Attributes() + : ResourceClass(llvm::dxil::ResourceClass::UAV), IsROV(false), + RawBuffer(false) {} ---------------- damyanp wrote:
Wondering if a delegating constructor would be preferable here, just to make clear that this version just sets defaults. ```suggestion Attributes() : Attributes(llvm::dxil::ResourceClass::UAV, false, false) {} ``` Or maybe we could just provide defaults for the parameters in the other constructor? https://github.com/llvm/llvm-project/pull/107954 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits