From 1e4b96aa0adf275b12491925dc8f864bcd902239 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Sat, 7 Jun 2008 14:57:20 +0100 Subject: [PATCH] Simplify code a bit as rval type is never needed --- tgt-vhdl/stmt.cc | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tgt-vhdl/stmt.cc b/tgt-vhdl/stmt.cc index 636c4f283..edb18d585 100644 --- a/tgt-vhdl/stmt.cc +++ b/tgt-vhdl/stmt.cc @@ -167,15 +167,9 @@ static int draw_nbassign(vhdl_process *proc, ivl_statement_t stmt) vhdl_expr *rhs = translate_expr(ivl_stmt_rval(stmt)); if (NULL == rhs) return 1; - - vhdl_decl *decl = proc->get_parent()->get_decl(signame); - assert(decl); - - vhdl_type *lval_type = decl->get_type()->clone(); - vhdl_var_ref *lval_ref = new vhdl_var_ref(signame, lval_type); - - // TODO: Internal sanity check: - // ensure rhs->get_type() == lval_type + + // The type here can be null as it is never actually needed + vhdl_var_ref *lval_ref = new vhdl_var_ref(signame, NULL); proc->add_stmt(new vhdl_nbassign_stmt(lval_ref, rhs)); }