[PATCH] D69565: [update_cc_test_checks.py] Use -ast-dump=json to get mangled name
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 29 09:02:40 PDT 2019
MaskRay added inline comments.
================
Comment at: llvm/utils/update_cc_test_checks.py:47
+ json_dump_args = [args.clang]
+ json_dump_args.extend(clang_args)
+ json_dump_args += ["-fsyntax-only", "-o", "-"]
----------------
`json_dump_args = [args.clang, *clang_args]`
================
Comment at: llvm/utils/update_cc_test_checks.py:48
+ json_dump_args.extend(clang_args)
+ json_dump_args += ["-fsyntax-only", "-o", "-"]
+ if "-cc1" not in json_dump_args:
----------------
Can you switch to single quotes? I think that is preferred style and is consistent with other occurrences of string literals.
================
Comment at: llvm/utils/update_cc_test_checks.py:50
+ if "-cc1" not in json_dump_args:
+ # for tests that invoke %clang instead if %clang_cc1 we have to use
+ # -Xclang -ast-dump=json instead:
----------------
Capitalize `for`
================
Comment at: llvm/utils/update_cc_test_checks.py:63
+ output = status.stdout
+ if sys.version_info[0] > 2:
+ output = output.decode()
----------------
This script is Python 3 only. No need to check `sys.version_info`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69565/new/
https://reviews.llvm.org/D69565
More information about the llvm-commits
mailing list