[PATCH] D71709: Give frontend dump flags consistent names (*-dump instead of dump-*)
David Herzka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 19 10:32:58 PST 2019
herzka updated this revision to Diff 234746.
herzka added a comment.
Update argument parsing
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71709/new/
https://reviews.llvm.org/D71709
Files:
clang/include/clang/Driver/CC1Options.td
clang/lib/Frontend/CompilerInvocation.cpp
Index: clang/lib/Frontend/CompilerInvocation.cpp
===================================================================
--- clang/lib/Frontend/CompilerInvocation.cpp
+++ clang/lib/Frontend/CompilerInvocation.cpp
@@ -851,7 +851,7 @@
Opts.CoverageMapping =
Args.hasFlag(OPT_fcoverage_mapping, OPT_fno_coverage_mapping, false);
- Opts.DumpCoverageMapping = Args.hasArg(OPT_dump_coverage_mapping);
+ Opts.DumpCoverageMapping = Args.hasArg(OPT_coverage_mapping_dump);
Opts.AsmVerbose = Args.hasArg(OPT_masm_verbose);
Opts.PreserveAsmComments = !Args.hasArg(OPT_fno_preserve_as_comments);
Opts.AssumeSaneOperatorNew = !Args.hasArg(OPT_fno_assume_sane_operator_new);
@@ -1725,9 +1725,9 @@
Opts.ProgramAction = frontend::ASTView; break;
case OPT_compiler_options_dump:
Opts.ProgramAction = frontend::DumpCompilerOptions; break;
- case OPT_dump_raw_tokens:
+ case OPT_raw_tokens_dump:
Opts.ProgramAction = frontend::DumpRawTokens; break;
- case OPT_dump_tokens:
+ case OPT_tokens_dump:
Opts.ProgramAction = frontend::DumpTokens; break;
case OPT_S:
Opts.ProgramAction = frontend::EmitAssembly; break;
@@ -3340,7 +3340,7 @@
Opts.DisablePCHValidation = Args.hasArg(OPT_fno_validate_pch);
Opts.AllowPCHWithCompilerErrors = Args.hasArg(OPT_fallow_pch_with_errors);
- Opts.DumpDeserializedPCHDecls = Args.hasArg(OPT_dump_deserialized_pch_decls);
+ Opts.DumpDeserializedPCHDecls = Args.hasArg(OPT_deserialized_pch_decls_dump);
for (const auto *A : Args.filtered(OPT_error_on_deserialized_pch_decl))
Opts.DeserializedPCHDeclsToErrorOn.insert(A->getValue());
Index: clang/include/clang/Driver/CC1Options.td
===================================================================
--- clang/include/clang/Driver/CC1Options.td
+++ clang/include/clang/Driver/CC1Options.td
@@ -272,8 +272,10 @@
HelpText<"Four-byte version string for gcov files.">;
def test_coverage : Flag<["-"], "test-coverage">,
HelpText<"Do not generate coverage files or remove coverage changes from IR">;
-def dump_coverage_mapping : Flag<["-"], "dump-coverage-mapping">,
+def coverage_mapping_dump : Flag<["-"], "coverage-mapping-dump">,
HelpText<"Dump the coverage mapping records, for testing">;
+def dump_coverage_mapping : Flag<["-"], "dump-coverage-mapping">,
+ Alias<coverage_mapping_dump>;
def fuse_register_sized_bitfield_access: Flag<["-"], "fuse-register-sized-bitfield-access">,
HelpText<"Use register sized accesses to bit-fields, when possible.">;
def relaxed_aliasing : Flag<["-"], "relaxed-aliasing">,
@@ -559,12 +561,16 @@
def Eonly : Flag<["-"], "Eonly">,
HelpText<"Just run preprocessor, no output (for timings)">;
-def dump_raw_tokens : Flag<["-"], "dump-raw-tokens">,
+def raw_tokens_dump : Flag<["-"], "raw-tokens-dump">,
HelpText<"Lex file in raw mode and dump raw tokens">;
+def dump_raw_tokens : Flag<["-"], "dump-raw-tokens">,
+ Alias<raw_tokens_dump>;
def analyze : Flag<["-"], "analyze">,
HelpText<"Run static analysis engine">;
-def dump_tokens : Flag<["-"], "dump-tokens">,
+def tokens_dump : Flag<["-"], "tokens-dump">,
HelpText<"Run preprocessor, dump internal rep of tokens">;
+def dump_tokens : Flag<["-"], "dump-tokens">,
+ Alias<tokens_dump>;
def init_only : Flag<["-"], "init-only">,
HelpText<"Only execute frontend initialization">;
def fixit : Flag<["-"], "fixit">,
@@ -726,8 +732,10 @@
HelpText<"Disable validation of precompiled headers">;
def fallow_pch_with_errors : Flag<["-"], "fallow-pch-with-compiler-errors">,
HelpText<"Accept a PCH file that was created with compiler errors">;
-def dump_deserialized_pch_decls : Flag<["-"], "dump-deserialized-decls">,
+def deserialized_pch_decls_dump : Flag<["-"], "deserialized-decls-dump">,
HelpText<"Dump declarations that are deserialized from PCH, for testing">;
+def dump_deserialized_pch_decls : Flag<["-"], "dump-deserialized-decls">,
+ Alias<deserialized_pch_decls_dump>;
def error_on_deserialized_pch_decl : Separate<["-"], "error-on-deserialized-decl">,
HelpText<"Emit error if a specific declaration is deserialized from PCH, for testing">;
def error_on_deserialized_pch_decl_EQ : Joined<["-"], "error-on-deserialized-decl=">,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71709.234746.patch
Type: text/x-patch
Size: 4221 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191219/7153a0dc/attachment-0001.bin>
More information about the cfe-commits
mailing list