[llvm] r348576 - [utils] Use operator "in" instead of bound function "has_key"
Roger Ferrer Ibanez via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 7 01:49:21 PST 2018
Author: rogfer01
Date: Fri Dec 7 01:49:21 2018
New Revision: 348576
URL: http://llvm.org/viewvc/llvm-project?rev=348576&view=rev
Log:
[utils] Use operator "in" instead of bound function "has_key"
has_key has been removed in Python 3. The in comparison operator can be used
instead.
Differential Revision: https://reviews.llvm.org/D55310
Modified:
llvm/trunk/utils/UpdateTestChecks/common.py
Modified: llvm/trunk/utils/UpdateTestChecks/common.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/UpdateTestChecks/common.py?rev=348576&r1=348575&r2=348576&view=diff
==============================================================================
--- llvm/trunk/utils/UpdateTestChecks/common.py (original)
+++ llvm/trunk/utils/UpdateTestChecks/common.py Fri Dec 7 01:49:21 2018
@@ -104,7 +104,7 @@ def build_function_body_dictionary(funct
body = m.group('body')
scrubbed_body = do_scrub(body, scrubber, scrubber_args, extra = False)
scrubbed_extra = do_scrub(body, scrubber, scrubber_args, extra = True)
- if m.groupdict().has_key('analysis'):
+ if 'analysis' in m.groupdict():
analysis = m.group('analysis')
if analysis.lower() != 'cost model analysis':
print('WARNING: Unsupported analysis mode: %r!' % (analysis,), file=sys.stderr)
More information about the llvm-commits
mailing list