================
@@ -1272,6 +1280,49 @@ std::optional<LValue>
CGHLSLRuntime::emitResourceArraySubscriptExpr(
return CGF.MakeAddrLValue(TmpVar, ResultTy, AlignmentSource::Decl);
}
+// If RHSExpr is a global resource array, initialize all of its resources and
+// set them into LHS. Returns false if no copy has been performed and the
+// array copy should be handled by Clang codegen.
+bool CGHLSLRuntime::emitResourceArrayCopy(LValue &LHS, Expr *RHSExpr,
+ CodeGenFunction &CGF) {
+ QualType ResultTy = RHSExpr->getType();
+ assert((ResultTy->isHLSLResourceRecordArray()) && "expected resource array");
----------------
bogner wrote:
```suggestion
assert(ResultTy->isHLSLResourceRecordArray() && "expected resource array");
```
https://github.com/llvm/llvm-project/pull/166880
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits