981 std::vector<AstNode*> global_decls;
988 for (
auto n : global_decls)
989 (*it)->children.push_back(
n->clone());
991 if (
flag_icells && (*it)->str.substr(0, 2) ==
"\\$")
992 (*it)->str = (*it)->str.substr(1);
995 (*it)->str =
"$abstract" + (*it)->str;
997 if (design->
has((*it)->str)) {
999 log_error(
"Re-definition of module `%s' at %s:%d!\n",
1000 (*it)->str.c_str(), (*it)->filename.c_str(), (*it)->linenum);
1001 log(
"Ignoring re-definition of module `%s' at %s:%d!\n",
1002 (*it)->str.c_str(), (*it)->filename.c_str(), (*it)->linenum);
1009 global_decls.push_back(*it);
static AstModule * process_module(AstNode *ast, bool defer)
void add(RTLIL::Module *module)
void log_error(const char *format,...)
#define log_assert(_assert_expr_)
bool has(RTLIL::IdString id) const
void log(const char *format,...)
std::vector< AstNode * > children