Skip to content

Commit

Permalink
#2845 ensure consistent symbol table used
Browse files Browse the repository at this point in the history
  • Loading branch information
arporter committed Jan 15, 2025
1 parent b78c558 commit f6b67f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/psyclone/psyir/symbols/symbol_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -1625,6 +1625,11 @@ def resolve_imports(self, container_symbols=None, symbol_target=None):
# TODO #11: It would be useful to log this.
continue

if not external_container:
# Failed to get a Container (possibly due to parsing or raising
# errors).
continue

Check warning on line 1631 in src/psyclone/psyir/symbols/symbol_table.py

View check run for this annotation

Codecov / codecov/patch

src/psyclone/psyir/symbols/symbol_table.py#L1631

Added line #L1631 was not covered by tests

# Examine all Symbols defined within this external container
for symbol in external_container.symbol_table.symbols:
if symbol.visibility == Symbol.Visibility.PRIVATE:
Expand Down
1 change: 0 additions & 1 deletion src/psyclone/psyir/transformations/inline_trans.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ def apply(self, node, options=None):
for child in new_stmts:
idx += 1
parent.addchild(child, idx)
table = parent.scope.symbol_table
# Avoid a potential name clash with the original function
table.rename_symbol(
routine.return_symbol, table.next_available_name(
Expand Down

0 comments on commit f6b67f2

Please sign in to comment.