[PATCH] D69565: [update_cc_test_checks.py] Use -ast-dump=json to get mangled name
Alexander Richardson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 29 07:48:46 PDT 2019
arichardson created this revision.
arichardson added reviewers: MaskRay, xbolva00.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Using c-index-test is fragile since it does not parse all the clang
arguments that are used in the RUN: line. This can result in incorrect
mangled names that do not match any of the generated IR.
For example macOS triples include a leading underscore (which was handled
with a hack in the current script). For the CHERI target we have added
new qualifiers which affect C++ name mangling, but will be included added
by update_cc_test_checks since it parses the source file with the host
triple because it ignores the -triple= argument passed to clang -cc1.
Using the new feature of including the mangled name in the JSON AST dump
(see D69564 <https://reviews.llvm.org/D69564>), we simply parse the output of the RUN: command with
"-fsyntax-only -ast-dump=json" appended.
This should make the script less fragile and also forks one process less.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D69565
Files:
llvm/utils/update_cc_test_checks.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69565.226901.patch
Type: text/x-patch
Size: 6780 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191029/59b45e38/attachment.bin>
More information about the llvm-commits
mailing list