[clang] [HLSL] Implement output parameter (PR #101083)

Damyan Pepper via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 30 17:55:35 PDT 2024


================
@@ -5318,3 +5319,13 @@ OMPIteratorExpr *OMPIteratorExpr::CreateEmpty(const ASTContext &Context,
       alignof(OMPIteratorExpr));
   return new (Mem) OMPIteratorExpr(EmptyShell(), NumIterators);
 }
+
+HLSLOutArgExpr *HLSLOutArgExpr::Create(const ASTContext &C, QualType Ty,
+                                       Expr *Base, bool IsInOut, Expr *WB,
+                                       OpaqueValueExpr *OpV) {
+  return new (C) HLSLOutArgExpr(Ty, Base, WB, OpV, IsInOut);
----------------
damyanp wrote:

For my education, how do you decide whether to use `C.Allocate` versus just `C`?

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


More information about the cfe-commits mailing list