Clean up pseudo-private member usage in `frontends/ilang/ilang_parser.y`.
authorAlberto Gonzalez <boqwxp@airmail.cc>
Mon, 13 Apr 2020 04:22:00 +0000 (04:22 +0000)
committerAlberto Gonzalez <boqwxp@airmail.cc>
Mon, 13 Apr 2020 04:22:00 +0000 (04:22 +0000)
frontends/ilang/ilang_parser.y

index 91adc0cc9e13df46d0b035d6cfade99a53371d2a..0522fa72acd48e9362c3267161e19532b7058953 100644 (file)
@@ -169,7 +169,7 @@ wire_stmt:
                current_wire->attributes = attrbuf;
                attrbuf.clear();
        } wire_options TOK_ID EOL {
-               if (current_module->wires_.count($4) != 0)
+               if (current_module->wire($4) != nullptr)
                        rtlil_frontend_ilang_yyerror(stringf("ilang error: redefinition of wire %s.", $4).c_str());
                current_module->rename(current_wire, $4);
                free($4);
@@ -232,7 +232,7 @@ memory_options:
 
 cell_stmt:
        TOK_CELL TOK_ID TOK_ID EOL {
-               if (current_module->cells_.count($3) != 0)
+               if (current_module->cell($3) != nullptr)
                        rtlil_frontend_ilang_yyerror(stringf("ilang error: redefinition of cell %s.", $3).c_str());
                current_cell = current_module->addCell($3, $2);
                current_cell->attributes = attrbuf;
@@ -427,9 +427,9 @@ sigspec:
                delete $1;
        } |
        TOK_ID {
-               if (current_module->wires_.count($1) == 0)
+               if (current_module->wire($1) == nullptr)
                        rtlil_frontend_ilang_yyerror(stringf("ilang error: wire %s not found", $1).c_str());
-               $$ = new RTLIL::SigSpec(current_module->wires_[$1]);
+               $$ = new RTLIL::SigSpec(current_module->wire($1));
                free($1);
        } |
        sigspec '[' TOK_INT ']' {