diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-05-25 21:57:59 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-05-25 21:57:59 +0000 |
commit | 53caba6cc23a9c95e2190bc3fc90646a5d09be5d (patch) | |
tree | 7ac99bfa5aa6115f42d481eb9a7a70290e6eea07 | |
parent | e00c8fdcc150516ea55304000f28d468c75334aa (diff) |
Small code cleanup. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157502 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | runtime/libprofile/GCDAProfiling.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/runtime/libprofile/GCDAProfiling.c b/runtime/libprofile/GCDAProfiling.c index 32d19ad774..b01b948142 100644 --- a/runtime/libprofile/GCDAProfiling.c +++ b/runtime/libprofile/GCDAProfiling.c @@ -43,10 +43,8 @@ static void write_int32(uint32_t i) { } static void write_int64(uint64_t i) { - uint32_t lo, hi; - lo = i >> 0; - hi = i >> 32; - + uint32_t lo = i >> 0; + uint32_t hi = i >> 32; write_int32(lo); write_int32(hi); } @@ -76,7 +74,6 @@ static char *mangle_filename(const char *orig_filename) { strcpy(filename, prefix); strcat(filename, "/"); strcat(filename, orig_filename); - return filename; } @@ -184,15 +181,13 @@ void llvm_gcda_emit_arcs(uint32_t num_counters, uint64_t *counters) { if (!output_file) return; fwrite("\0\0\xa1\1", 4, 1, output_file); write_int32(num_counters * 2); - for (i = 0; i < num_counters; ++i) { + for (i = 0; i < num_counters; ++i) write_int64(counters[i]); - } #ifdef DEBUG_GCDAPROFILING printf("llvmgcda: %u arcs\n", num_counters); - for (i = 0; i < num_counters; ++i) { + for (i = 0; i < num_counters; ++i) printf("llvmgcda: %llu\n", (unsigned long long)counters[i]); - } #endif } |