summaryrefslogtreecommitdiff
path: root/frontends/ilang/parser.y
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/ilang/parser.y')
-rw-r--r--frontends/ilang/parser.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/frontends/ilang/parser.y b/frontends/ilang/parser.y
index ab763b2b..67cc7da7 100644
--- a/frontends/ilang/parser.y
+++ b/frontends/ilang/parser.y
@@ -90,12 +90,12 @@ design:
module:
TOK_MODULE TOK_ID EOL {
- if (current_design->modules_.count($2) != 0)
+ if (current_design->has($2))
rtlil_frontend_ilang_yyerror(stringf("ilang error: redefinition of module %s.", $2).c_str());
current_module = new RTLIL::Module;
current_module->name = $2;
current_module->attributes = attrbuf;
- current_design->modules_[$2] = current_module;
+ current_design->add(current_module);
attrbuf.clear();
free($2);
} module_body TOK_END {