Skip to content

Commit 5481335

Browse files
authored
Merge pull request #167 from antmicro/top-typedef
Visit typedefs defined in the file level
2 parents 5c357f9 + 56a668a commit 5481335

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

uhdm-plugin/UhdmAst.cc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,11 +1027,12 @@ AST::AstNode *UhdmAst::find_ancestor(const std::unordered_set<AST::AstNodeType>
10271027
void UhdmAst::process_design()
10281028
{
10291029
current_node = make_ast_node(AST::AST_DESIGN);
1030-
visit_one_to_many({UHDM::uhdmallInterfaces, UHDM::uhdmallPackages, UHDM::uhdmallModules, UHDM::uhdmtopModules}, obj_h, [&](AST::AstNode *node) {
1031-
if (node) {
1032-
shared.top_nodes[node->str] = node;
1033-
}
1034-
});
1030+
visit_one_to_many({UHDM::uhdmallInterfaces, UHDM::uhdmallPackages, UHDM::uhdmallModules, UHDM::uhdmtopModules, vpiTypedef}, obj_h,
1031+
[&](AST::AstNode *node) {
1032+
if (node) {
1033+
shared.top_nodes[node->str] = node;
1034+
}
1035+
});
10351036
#ifdef BUILD_UPSTREAM
10361037
for (auto pair : shared.top_nodes) {
10371038
if (!pair.second)

0 commit comments

Comments
 (0)