[clang] [HLSL] Add Append/ConsumeStructuredBuffer definitions to HLSLExternalSemaSource (PR #113643)
Helena Kotas via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 7 18:09:47 PST 2024
================
@@ -530,6 +530,28 @@ void HLSLExternalSemaSource::defineHLSLTypesWithForwardDeclarations() {
.addArraySubscriptOperators()
.completeDefinition();
});
+
+ Decl =
+ BuiltinTypeDeclBuilder(*SemaPtr, HLSLNamespace, "AppendStructuredBuffer")
+ .addSimpleTemplateParams(*SemaPtr, {"element_type"})
+ .Record;
+ onCompletion(Decl, [this](CXXRecordDecl *Decl) {
+ setupBufferType(Decl, *SemaPtr, ResourceClass::UAV,
+ ResourceKind::TypedBuffer, /*IsROV=*/false,
----------------
hekota wrote:
The `ResourceKind` enumeration is passing into the `HLSLResource` attribute which si going away soon (llvm/llvm-project#104862). I agree it is confusing though. I'll change it here and in all of the other structured buffers.
https://github.com/llvm/llvm-project/pull/113643
More information about the cfe-commits
mailing list