forked from OSchip/llvm-project
Fix minor gcc warnings.
C++ style comments not allowed in C90, signed unsigned comparision. llvm-svn: 196948
This commit is contained in:
parent
0f5f015bfd
commit
d326252d29
|
@ -403,7 +403,7 @@ void llvm_gcda_emit_arcs(uint32_t num_counters, uint64_t *counters) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void llvm_gcda_summary_info() {
|
void llvm_gcda_summary_info() {
|
||||||
const int obj_summary_len = 9; // length for gcov compatibility
|
const uint32_t obj_summary_len = 9; /* Length for gcov compatibility. */
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
uint32_t runs = 1;
|
uint32_t runs = 1;
|
||||||
uint32_t val = 0;
|
uint32_t val = 0;
|
||||||
|
@ -420,15 +420,15 @@ void llvm_gcda_summary_info() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
val = read_32bit_value(); // length
|
val = read_32bit_value(); /* length */
|
||||||
if (val != obj_summary_len) {
|
if (val != obj_summary_len) {
|
||||||
fprintf(stderr, "profiling:invalid object length (%d)\n", val); // length
|
fprintf(stderr, "profiling:invalid object length (%d)\n", val);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
read_32bit_value(); // checksum, unused
|
read_32bit_value(); /* checksum, unused */
|
||||||
read_32bit_value(); // num, unused
|
read_32bit_value(); /* num, unused */
|
||||||
runs += read_32bit_value(); // add previous run count to new counter
|
runs += read_32bit_value(); /* Add previous run count to new counter. */
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_pos = save_cur_pos;
|
cur_pos = save_cur_pos;
|
||||||
|
@ -436,15 +436,15 @@ void llvm_gcda_summary_info() {
|
||||||
/* Object summary tag */
|
/* Object summary tag */
|
||||||
write_bytes("\0\0\0\xa1", 4);
|
write_bytes("\0\0\0\xa1", 4);
|
||||||
write_32bit_value(obj_summary_len);
|
write_32bit_value(obj_summary_len);
|
||||||
write_32bit_value(0); // checksum, unused
|
write_32bit_value(0); /* checksum, unused */
|
||||||
write_32bit_value(0); // num, unused
|
write_32bit_value(0); /* num, unused */
|
||||||
write_32bit_value(runs);
|
write_32bit_value(runs);
|
||||||
for (i = 3; i < obj_summary_len; ++i)
|
for (i = 3; i < obj_summary_len; ++i)
|
||||||
write_32bit_value(0);
|
write_32bit_value(0);
|
||||||
|
|
||||||
/* Program summary tag */
|
/* Program summary tag */
|
||||||
write_bytes("\0\0\0\xa3", 4); // tag indicates 1 program
|
write_bytes("\0\0\0\xa3", 4); /* tag indicates 1 program */
|
||||||
write_32bit_value(0); // 0 length
|
write_32bit_value(0); /* 0 length */
|
||||||
|
|
||||||
#ifdef DEBUG_GCDAPROFILING
|
#ifdef DEBUG_GCDAPROFILING
|
||||||
fprintf(stderr, "llvmgcda: %u runs\n", runs);
|
fprintf(stderr, "llvmgcda: %u runs\n", runs);
|
||||||
|
|
Loading…
Reference in New Issue