Show expression trees correctly.

This commit is contained in:
David Given 2016-10-01 23:41:03 +02:00
parent 3474e20274
commit 73d7e89c32

View file

@ -140,7 +140,7 @@ static void print_expr(char k, const struct ir* ir)
default:
if (ir->left)
{
if (ir->left->root == ir->root)
if (ir->left->root != ir->root)
tracef(k, "$%d", ir->left->id);
else
print_expr(k, ir->left);
@ -148,7 +148,7 @@ static void print_expr(char k, const struct ir* ir)
if (ir->right)
{
tracef(k, ", ");
if (ir->right->root == ir->root)
if (ir->right->root != ir->root)
tracef(k, "$%d", ir->right->id);
else
print_expr(k, ir->right);