[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

llvm-svn: 348576
This commit is contained in:
Roger Ferrer Ibanez 2018-12-07 09:49:21 +00:00
parent 66e4940592
commit b8655608cc

View File

@ -104,7 +104,7 @@ def build_function_body_dictionary(function_re, scrubber, scrubber_args, raw_too
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)