Author: oToToT Date: 2021-09-07T10:42:18+08:00 New Revision: 95299019e35b21a790a2f797bede1af98d84fcb5
URL: https://github.com/llvm/llvm-project/commit/95299019e35b21a790a2f797bede1af98d84fcb5 DIFF: https://github.com/llvm/llvm-project/commit/95299019e35b21a790a2f797bede1af98d84fcb5.diff LOG: [clang] Add '-ast-dump-filter=' support Before this patch, we only support syntax like `clang -cc1 -ast-dump -ast-dump-filter main a.c` or `clang -Xclang -ast-dump -Xclang -ast-dump-filter -Xclang main a.c` when using ast-dump-filter. It is helpful to also support `-ast-dump-filter=` syntax, so we can do something like `clang -cc1 -ast-dump -ast-dump-filter=main a.c` or `clang -Xclang -ast-dump -Xclang -ast-dump-filter=main a.c` It is more cleaner when passing arguments through `-Xclang` in this case. Also, **clang-check** do support this syntax, and I think people might be confiused when they found they can't use `ast-dump-filter` with clang. Added: Modified: clang/include/clang/Driver/Options.td Removed: ################################################################################ diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index adac18b4404fd..0b374fa4db410 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -5282,6 +5282,8 @@ def ast_dump_filter : Separate<["-"], "ast-dump-filter">, " nodes having a certain substring in a qualified name. Use" " -ast-list to list all filterable declaration node names.">, MarshallingInfoString<FrontendOpts<"ASTDumpFilter">>; +def ast_dump_filter_EQ : Joined<["-"], "ast-dump-filter=">, + Alias<ast_dump_filter>; def fno_modules_global_index : Flag<["-"], "fno-modules-global-index">, HelpText<"Do not automatically generate or update the global module index">, MarshallingInfoNegativeFlag<FrontendOpts<"UseGlobalModuleIndex">>; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits