1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

[utils] The func_dict for a prefix may just be empty

Follow up from D92965 - since we try to find failed prefixes
after each RUN line, it's possible the whole list of functions for a
prefix be non-existent, which is fine - this happens when none of the
RUN lines seen so far used the prefix.
This commit is contained in:
Mircea Trofin 2020-12-15 08:40:01 -08:00
parent 13de76cd3b
commit a3554dd52a

View File

@ -261,10 +261,10 @@ class function_body(object):
def get_failed_prefixes(func_dict):
# This returns the list of those prefixes that failed to match any function,
# because there were conflicting bodies produced by different RUN lines, in
# all instances of the prefix. Effectivelly, this prefix is unused and should
# all instances of the prefix. Effectively, this prefix is unused and should
# be removed.
for prefix in func_dict:
if (not [fct for fct in func_dict[prefix]
if func_dict[prefix] and (not [fct for fct in func_dict[prefix]
if func_dict[prefix][fct] is not None]):
yield prefix