aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcov.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2020-06-30 15:48:03 +0200
committerMartin Liska <mliska@suse.cz>2020-07-01 13:00:04 +0200
commitc4076255e632991f5a76c058bfadaa9d8f1159ee (patch)
treec62b82d6d4ef408d92c9942dbdbd25218f34a21b /gcc/gcov.c
parent624e60f080989fa57756575a0bb47a97748b52b8 (diff)
downloadgcc-c4076255e632991f5a76c058bfadaa9d8f1159ee.zip
gcc-c4076255e632991f5a76c058bfadaa9d8f1159ee.tar.gz
gcc-c4076255e632991f5a76c058bfadaa9d8f1159ee.tar.bz2
gcov: rename 2 options.
gcc/ChangeLog: * doc/gcov.texi: Rename 2 options. * gcov.c (print_usage): Rename -i,--json-format to -j,--json-format and -j,--human-readable to -H,--human-readable. (process_args): Fix up parsing. Document obsolete options and how are they changed. gcc/testsuite/ChangeLog: * g++.dg/gcov/loop.C: Use -H option instead of -j option.
Diffstat (limited to 'gcc/gcov.c')
-rw-r--r--gcc/gcov.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/gcov.c b/gcc/gcov.c
index ef93758..c60f511 100644
--- a/gcc/gcov.c
+++ b/gcc/gcov.c
@@ -898,8 +898,8 @@ print_usage (int error_p)
fnotice (file, " -d, --display-progress Display progress information\n");
fnotice (file, " -f, --function-summaries Output summaries for each function\n");
fnotice (file, " -h, --help Print this help, then exit\n");
- fnotice (file, " -i, --json-format Output JSON intermediate format into .gcov.json.gz file\n");
- fnotice (file, " -j, --human-readable Output human readable numbers\n");
+ fnotice (file, " -j, --json-format Output JSON intermediate format into .gcov.json.gz file\n");
+ fnotice (file, " -H, --human-readable Output human readable numbers\n");
fnotice (file, " -k, --use-colors Emit colored output\n");
fnotice (file, " -l, --long-file-names Use long output file names for included\n\
source files\n");
@@ -915,6 +915,9 @@ print_usage (int error_p)
fnotice (file, " -v, --version Print version number, then exit\n");
fnotice (file, " -w, --verbose Print verbose informations\n");
fnotice (file, " -x, --hash-filenames Hash long pathnames\n");
+ fnotice (file, "\nObsolete options:\n");
+ fnotice (file, " -i, --json-format Replaced with -j, --json-format\n");
+ fnotice (file, " -j, --human-readable Replaced with -H, --human-readable\n");
fnotice (file, "\nFor bug reporting instructions, please see:\n%s.\n",
bug_report_url);
exit (status);
@@ -942,8 +945,8 @@ static const struct option options[] =
{ "all-blocks", no_argument, NULL, 'a' },
{ "branch-probabilities", no_argument, NULL, 'b' },
{ "branch-counts", no_argument, NULL, 'c' },
- { "json-format", no_argument, NULL, 'i' },
- { "human-readable", no_argument, NULL, 'j' },
+ { "json-format", no_argument, NULL, 'j' },
+ { "human-readable", no_argument, NULL, 'H' },
{ "no-output", no_argument, NULL, 'n' },
{ "long-file-names", no_argument, NULL, 'l' },
{ "function-summaries", no_argument, NULL, 'f' },
@@ -969,7 +972,7 @@ process_args (int argc, char **argv)
{
int opt;
- const char *opts = "abcdfhijklmno:pqrs:tuvwx";
+ const char *opts = "abcdfhHijklmno:pqrs:tuvwx";
while ((opt = getopt_long (argc, argv, opts, options, NULL)) != -1)
{
switch (opt)
@@ -992,7 +995,7 @@ process_args (int argc, char **argv)
case 'l':
flag_long_names = 1;
break;
- case 'j':
+ case 'H':
flag_human_readable_numbers = 1;
break;
case 'k':
@@ -1024,6 +1027,7 @@ process_args (int argc, char **argv)
flag_unconditional = 1;
break;
case 'i':
+ case 'j':
flag_json_format = 1;
flag_gcov_file = 1;
break;