From 6044ae79a013ba6067ffd968cee97c0d29b728c2 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 9 Mar 2010 16:40:45 -0800 Subject: [PATCH] IR print visitor: Print assignments --- ir_print_visitor.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/ir_print_visitor.cpp b/ir_print_visitor.cpp index 8c4271e466a..365ff5933e3 100644 --- a/ir_print_visitor.cpp +++ b/ir_print_visitor.cpp @@ -77,8 +77,22 @@ void ir_print_visitor::visit(ir_dereference *ir) void ir_print_visitor::visit(ir_assignment *ir) { - printf("%s:%d:\n", __func__, __LINE__); - (void) ir; + printf("(assign\n"); + + printf(" ("); + if (ir->condition) + ir->condition->accept(this); + else + printf("true"); + printf(")\n"); + + printf(" ("); + ir->lhs->accept(this); + printf(")\n"); + + printf(" ("); + ir->rhs->accept(this); + printf(")\n"); } -- 2.30.2