Mercurial > hg > CbC > CbC_gcc
comparison gcc/gcov-tool.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 /* Gcc offline profile processing tool support. */ | 1 /* Gcc offline profile processing tool support. */ |
2 /* Copyright (C) 2014-2018 Free Software Foundation, Inc. | 2 /* Copyright (C) 2014-2020 Free Software Foundation, Inc. |
3 Contributed by Rong Xu <xur@google.com>. | 3 Contributed by Rong Xu <xur@google.com>. |
4 | 4 |
5 This file is part of GCC. | 5 This file is part of GCC. |
6 | 6 |
7 GCC is free software; you can redistribute it and/or modify it under | 7 GCC is free software; you can redistribute it and/or modify it under |
68 | 68 |
69 if (len > len1 && !strncmp (len -len1 + name, GCOV_DATA_SUFFIX, len1)) | 69 if (len > len1 && !strncmp (len -len1 + name, GCOV_DATA_SUFFIX, len1)) |
70 ret = remove (name); | 70 ret = remove (name); |
71 | 71 |
72 if (ret) | 72 if (ret) |
73 fatal_error (input_location, "error in removing %s\n", name); | 73 fatal_error (input_location, "error in removing %s", name); |
74 | 74 |
75 return ret; | 75 return ret; |
76 } | 76 } |
77 #endif | 77 #endif |
78 | 78 |
186 { 0, 0, 0, 0 } | 186 { 0, 0, 0, 0 } |
187 }; | 187 }; |
188 | 188 |
189 /* Print merge usage and exit. */ | 189 /* Print merge usage and exit. */ |
190 | 190 |
191 static void | 191 static void ATTRIBUTE_NORETURN |
192 merge_usage (void) | 192 merge_usage (void) |
193 { | 193 { |
194 fnotice (stderr, "Merge subcomand usage:"); | 194 fnotice (stderr, "Merge subcomand usage:"); |
195 print_merge_usage_message (true); | 195 print_merge_usage_message (true); |
196 exit (FATAL_EXIT_CODE); | 196 exit (FATAL_EXIT_CODE); |
218 output_dir = optarg; | 218 output_dir = optarg; |
219 break; | 219 break; |
220 case 'w': | 220 case 'w': |
221 sscanf (optarg, "%d,%d", &w1, &w2); | 221 sscanf (optarg, "%d,%d", &w1, &w2); |
222 if (w1 < 0 || w2 < 0) | 222 if (w1 < 0 || w2 < 0) |
223 fatal_error (input_location, "weights need to be non-negative\n"); | 223 fatal_error (input_location, "weights need to be non-negative"); |
224 break; | 224 break; |
225 default: | 225 default: |
226 merge_usage (); | 226 merge_usage (); |
227 } | 227 } |
228 } | 228 } |
282 { 0, 0, 0, 0 } | 282 { 0, 0, 0, 0 } |
283 }; | 283 }; |
284 | 284 |
285 /* Print profile rewrite usage and exit. */ | 285 /* Print profile rewrite usage and exit. */ |
286 | 286 |
287 static void | 287 static void ATTRIBUTE_NORETURN |
288 rewrite_usage (void) | 288 rewrite_usage (void) |
289 { | 289 { |
290 fnotice (stderr, "Rewrite subcommand usage:"); | 290 fnotice (stderr, "Rewrite subcommand usage:"); |
291 print_rewrite_usage_message (true); | 291 print_rewrite_usage_message (true); |
292 exit (FATAL_EXIT_CODE); | 292 exit (FATAL_EXIT_CODE); |
353 else | 353 else |
354 denominator = 0; | 354 denominator = 0; |
355 } | 355 } |
356 | 356 |
357 if (scale < 0.0) | 357 if (scale < 0.0) |
358 fatal_error (input_location, "scale needs to be non-negative\n"); | 358 fatal_error (input_location, "scale needs to be non-negative"); |
359 | 359 |
360 if (normalize_val != 0) | 360 if (normalize_val != 0) |
361 { | 361 { |
362 fnotice (stderr, "normalization cannot co-exist with scaling\n"); | 362 fnotice (stderr, "normalization cannot co-exist with scaling\n"); |
363 normalize_val = 0; | 363 normalize_val = 0; |
523 | 523 |
524 static void | 524 static void |
525 print_version (void) | 525 print_version (void) |
526 { | 526 { |
527 fnotice (stdout, "%s %s%s\n", progname, pkgversion_string, version_string); | 527 fnotice (stdout, "%s %s%s\n", progname, pkgversion_string, version_string); |
528 fnotice (stdout, "Copyright %s 2018 Free Software Foundation, Inc.\n", | 528 fnotice (stdout, "Copyright %s 2020 Free Software Foundation, Inc.\n", |
529 _("(C)")); | 529 _("(C)")); |
530 fnotice (stdout, | 530 fnotice (stdout, |
531 _("This is free software; see the source for copying conditions.\n" | 531 _("This is free software; see the source for copying conditions.\n" |
532 "There is NO warranty; not even for MERCHANTABILITY or \n" | 532 "There is NO warranty; not even for MERCHANTABILITY or \n" |
533 "FITNESS FOR A PARTICULAR PURPOSE.\n\n")); | 533 "FITNESS FOR A PARTICULAR PURPOSE.\n\n")); |