mirror of
https://github.com/YosysHQ/yosys.git
synced 2026-08-22 14:17:27 +02:00
sv: carry over global typedefs from previous files
This breaks the ability to use a global typename as a standard identifier in a subsequent input file. This is otherwise backwards compatible, including for sources which previously included conflicting typedefs in each input file.
This commit is contained in:
committed by
Zachary Snow
parent
092e923330
commit
f71c2dcca6
@@ -61,8 +61,11 @@ static void add_package_types(dict<std::string, AST::AstNode *> &user_types, std
|
||||
}
|
||||
}
|
||||
}
|
||||
user_type_stack.clear();
|
||||
user_type_stack.push_back(new UserTypeMap());
|
||||
|
||||
// carry over typedefs from previous files, but allow them to be overridden
|
||||
// note that these type maps are currently never reclaimed
|
||||
if (user_type_stack.empty() || !user_type_stack.back()->empty())
|
||||
user_type_stack.push_back(new UserTypeMap());
|
||||
}
|
||||
|
||||
struct VerilogFrontend : public Frontend {
|
||||
|
||||
Reference in New Issue
Block a user