Skip to content

Commit

Permalink
Function inlining: early exit if arg 'functions' is provided but empty
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelSt98 committed Oct 8, 2024
1 parent 21e86f6 commit 01fc82c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions loki/transformations/inline.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,9 @@ class FindInlineCallsSkipInlineCallParameters(ExpressionFinder):
"""
retriever = ExpressionRetrieverSkipInlineCallParameters(lambda e: isinstance(e, sym.InlineCall))

# functions are provided, however functions is empty, thus early exit
if functions is not None and not functions:
return False
functions = as_tuple(functions)

# Keep track of removed symbols
Expand Down

0 comments on commit 01fc82c

Please sign in to comment.