diff --git a/tools/qfcc/source/dot_expr.c b/tools/qfcc/source/dot_expr.c index 5b8b5b0c2..695c99b2f 100644 --- a/tools/qfcc/source/dot_expr.c +++ b/tools/qfcc/source/dot_expr.c @@ -605,6 +605,24 @@ print_extend (dstring_t *dstr, expr_t *e, int level, int id, expr_t *next) extend.extend, e->line); } +static void +print_multivec (dstring_t *dstr, expr_t *e, int level, int id, expr_t *next) +{ + int indent = level * 2 + 2; + ex_multivec_t multivec = e->e.multivec; + + for (auto c = multivec.components; c; c = c->next) { + _print_expr (dstr, c, level, id, next); + dasprintf (dstr, "%*se_%p -> \"e_%p\";\n", indent, "", e, c); + } + + dstring_t *typestr = dstring_newstr(); + print_type_str (typestr, e->e.multivec.type); + dasprintf (dstr, "%*se_%p [label=\"multivec %s\\n%d\"];\n", indent, "", e, + typestr->str, e->line); + dstring_delete (typestr); +} + static void _print_expr (dstring_t *dstr, expr_t *e, int level, int id, expr_t *next) { @@ -637,6 +655,7 @@ _print_expr (dstring_t *dstr, expr_t *e, int level, int id, expr_t *next) [ex_horizontal] = print_horizontal, [ex_swizzle] = print_swizzle, [ex_extend] = print_extend, + [ex_multivec] = print_multivec, }; int indent = level * 2 + 2;