Fix uneccessarily complicated generated case statement

No need to generate separate case test variable if the
test in the VL source is a simple variable reference.
This commit is contained in:
Nick Gasson 2008-07-03 16:27:36 +01:00
parent a5264e9995
commit 1736cd9bc8
1 changed files with 1 additions and 1 deletions

View File

@ -439,7 +439,7 @@ static int draw_case(vhdl_procedural *proc, stmt_container *container,
// VHDL case expressions are required to be quite simple: variable
// references or slices. So we may need to create a temporary
// variable to hold the result of the expression evaluation
if (typeid(test) != typeid(vhdl_var_ref)) {
if (typeid(*test) != typeid(vhdl_var_ref)) {
// TODO: Check if this is already declared
const char *tmp_name = "Verilog_Case_Ex";
vhdl_type *test_type = new vhdl_type(*test->get_type());