summaryrefslogtreecommitdiff
path: root/gcc/gcov-tool.c
diff options
context:
space:
mode:
authordanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>2016-06-22 01:46:06 +0000
committerdanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>2016-06-22 01:46:06 +0000
commitbd08c370d5a42f544c199e8b7bb49906b2dc0870 (patch)
tree7227251b43d09a6272f8ac01241575b8d81fba52 /gcc/gcov-tool.c
parentdf4d4b47d309366cebb966065cee6161dce06905 (diff)
downloadgcc-bd08c370d5a42f544c199e8b7bb49906b2dc0870.tar.gz
* c-common.c (get_source_date_epoch): Use int64_t instead of long long.
* gcov-tool.c (profile_rewrite): Use int64_t instead of long long. (do_rewrite): likewise. * line-map.c (location_adhoc_data_update): Use int64_t instead of long long. (get_combined_adhoc_loc): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237676 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcov-tool.c')
-rw-r--r--gcc/gcov-tool.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/gcc/gcov-tool.c b/gcc/gcov-tool.c
index f628b603a80..f3da73cc596 100644
--- a/gcc/gcov-tool.c
+++ b/gcc/gcov-tool.c
@@ -232,7 +232,7 @@ do_merge (int argc, char **argv)
Otherwise, multiply the all counters by SCALE. */
static int
-profile_rewrite (const char *d1, const char *out, long long n_val,
+profile_rewrite (const char *d1, const char *out, int64_t n_val,
float scale, int n, int d)
{
struct gcov_info * d1_profile;
@@ -261,7 +261,7 @@ print_rewrite_usage_message (int error_p)
fnotice (file, " -v, --verbose Verbose mode\n");
fnotice (file, " -o, --output <dir> Output directory\n");
fnotice (file, " -s, --scale <float or simple-frac> Scale the profile counters\n");
- fnotice (file, " -n, --normalize <long long> Normalize the profile\n");
+ fnotice (file, " -n, --normalize <int64_t> Normalize the profile\n");
}
static const struct option rewrite_options[] =
@@ -291,11 +291,7 @@ do_rewrite (int argc, char **argv)
int opt;
int ret;
const char *output_dir = 0;
-#ifdef HAVE_LONG_LONG
- long long normalize_val = 0;
-#else
int64_t normalize_val = 0;
-#endif
float scale = 0.0;
int numerator = 1;
int denominator = 1;
@@ -315,12 +311,10 @@ do_rewrite (int argc, char **argv)
break;
case 'n':
if (!do_scaling)
-#if defined(HAVE_LONG_LONG)
- normalize_val = strtoll (optarg, (char **)NULL, 10);
-#elif defined(INT64_T_IS_LONG)
+#if defined(INT64_T_IS_LONG)
normalize_val = strtol (optarg, (char **)NULL, 10);
#else
- sscanf (optarg, "%" SCNd64, &normalize_val);
+ normalize_val = strtoll (optarg, (char **)NULL, 10);
#endif
else
fnotice (stderr, "scaling cannot co-exist with normalization,"