aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/UpdateTestChecks/common.py
diff options
context:
space:
mode:
authorMircea Trofin <mtrofin@google.com>2020-12-15 08:40:01 -0800
committerMircea Trofin <mtrofin@google.com>2020-12-15 08:48:37 -0800
commit380e1d918cb4581fae0277ff547d75334f3e7ddd (patch)
tree7268d7351c574ba46e96b6da148025229bc2dc10 /llvm/utils/UpdateTestChecks/common.py
parent8acb5f2723ecaf0f1904a085ad79d0623cec38f6 (diff)
downloadllvm-380e1d918cb4581fae0277ff547d75334f3e7ddd.zip
llvm-380e1d918cb4581fae0277ff547d75334f3e7ddd.tar.gz
llvm-380e1d918cb4581fae0277ff547d75334f3e7ddd.tar.bz2
[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.
Diffstat (limited to 'llvm/utils/UpdateTestChecks/common.py')
-rw-r--r--llvm/utils/UpdateTestChecks/common.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py
index 8cd90de..21878e8 100644
--- a/llvm/utils/UpdateTestChecks/common.py
+++ b/llvm/utils/UpdateTestChecks/common.py
@@ -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