[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

Chris B via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 31 13:56:01 PDT 2024


================
@@ -282,6 +258,23 @@ struct BuiltinTypeDeclBuilder {
     return *this;
   }
 
+  FieldDecl *getResourceHandleField() {
+    FieldDecl *FD = Fields["h"];
+    if (FD && FD->getType()->isHLSLAttributedResourceType())
----------------
llvm-beanz wrote:

These should be `asserts` rather than `if`.

https://github.com/llvm/llvm-project/pull/114148


More information about the cfe-commits mailing list