Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl.c:
+static struct hlsl_ir_node *clone_call(struct hlsl_ctx *ctx, struct hlsl_ir_call *src) +{
- struct hlsl_ir_node *dst;
- if (!(dst = hlsl_new_call(ctx, src->decl, &src->node.loc)))
return NULL;
- return dst;
+}
+static struct hlsl_ir_node *clone_constant(struct hlsl_ctx *ctx, struct hlsl_ir_constant *src) +{
- struct hlsl_ir_constant *dst;
- if (!(dst = hlsl_alloc(ctx, sizeof(*dst))))
return NULL;
- init_node(&dst->node, HLSL_IR_CONSTANT, src->node.data_type, &src->node.loc);
We have `hlsl_new_constant()` now.