[ir] Add Function::AppendParam() helper

Use it from the ZeroInitializeWorkgroupMemory transform.

Change-Id: I98a72b9fca0e986cd092b13d92e71634f3e59d4e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/186922
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: James Price <jrprice@google.com>
diff --git a/src/tint/lang/core/ir/function.h b/src/tint/lang/core/ir/function.h
index 5cf533f..f7c7ebd 100644
--- a/src/tint/lang/core/ir/function.h
+++ b/src/tint/lang/core/ir/function.h
@@ -146,6 +146,10 @@
     /// @param params the function parameters
     void SetParams(std::initializer_list<FunctionParam*> params);
 
+    /// Appends a new function parameter.
+    /// @param param the function parameter to append
+    void AppendParam(FunctionParam* param);
+
     /// @returns the function parameters
     const VectorRef<FunctionParam*> Params() { return params_; }