[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())
+ return FD;
+ return nullptr;
+ }
+
+ QualType getFirstTemplateTypeParam() {
+ if (Template) {
----------------
llvm-beanz wrote:
This should be an assert rather than an `if`, this method should never get called if Template isn't set.
https://github.com/llvm/llvm-project/pull/114148
More information about the cfe-commits
mailing list