================
@@ -57,6 +57,15 @@ CXXConstructorDecl *lookupCopyConstructor(QualType ResTy) {
return CD;
return nullptr;
}
+
+/// Set up common members and attributes for buffer types
+static bool resourceHasCounter(const CXXRecordDecl *Decl) {
+ StringRef Name = Decl->getName();
+ return Name == "RWStructuredBuffer" || Name == "AppendStructuredBuffer" ||
+ Name == "ConsumeStructuredBuffer" ||
+ Name == "RasterizerOrderedStructuredBuffer";
+}
+
----------------
hekota wrote:
```suggestion
```
It would be best to avoid these string comparisons. Could you add `bool
HasCounter` to `HLSLExternalSemaSource::setupBufferType` and pass is to method
that adds the handles?
https://github.com/llvm/llvm-project/pull/161414
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits