================
@@ -4593,6 +4593,44 @@ def HLSLResourceBinding: InheritableAttr {
   let LangOpts = [HLSL];
   let Args = [StringArgument<"Slot">, StringArgument<"Space", 1>];
   let Documentation = [HLSLResourceBindingDocs];
+  let AdditionalMembers = [{
+      enum class RegisterType : unsigned { SRV, UAV, CBuffer, Sampler, C, I, 
Invalid };
+
+      RegisterType RegType;
+      unsigned SlotNumber;
+      unsigned SpaceNumber;
+      
+      // Size of the binding
+      // 0 == not set
+      //-1 == unbounded
+      int Size;
+
+      void setBinding(RegisterType RT, unsigned SlotNum, unsigned SpaceNum, 
int Size = 0) {
+        RegType = RT;
+        SlotNumber = SlotNum;
+        SpaceNumber = SpaceNum;
+      }
+      RegisterType getRegisterType() {
----------------
damyanp wrote:

All of these getters should be `const`.

https://github.com/llvm/llvm-project/pull/111203
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to