Summary:
Fix test checking time profiler generates correct tracing json-file.
`filter` works differently for python2 and python3, so unifying this.
Reviewers: mgehre, nathanchance
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D66873
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@370300
91177308-0d34-0410-b5e6-
96231b3b80d8
return b <= c
events = json.loads(sys.stdin.read())["traceEvents"]
-codegens = filter(lambda x: x["name"] == "CodeGen Function", events)
-frontends = filter(lambda x: x["name"] == "Frontend", events)
-backends = filter(lambda x: x["name"] == "Backend", events)
+codegens = [event for event in events if event["name"] == "CodeGen Function"]
+frontends = [event for event in events if event["name"] == "Frontend"]
+backends = [event for event in events if event["name"] == "Backend"]
if not all([any([is_inside(codegen, frontend) for frontend in frontends])
for codegen in codegens]):