Skip to content

Commit b6d1b81

Browse files
committed
Adjust one more place and fix warning
1 parent 8949970 commit b6d1b81

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler-rt/lib/profile/InstrProfilingMerge.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ int __llvm_profile_merge_from_buffer(const char *ProfileData,
207207
// CountersDelta computes the offset into the in-buffer counter section.
208208
//
209209
// On WIN64, CountersDelta is truncated as well, so no need for signext.
210-
char *SrcCounters = ptr_add_with_overflow(
210+
const char *SrcCounters = ptr_add_with_overflow(
211211
SrcCountersStart, (uintptr_t)SrcData->CounterPtr - CountersDelta);
212212
// CountersDelta needs to be decreased as we advance to the next data
213213
// record.
@@ -227,8 +227,8 @@ int __llvm_profile_merge_from_buffer(const char *ProfileData,
227227
}
228228
}
229229

230-
const char *SrcBitmap =
231-
SrcBitmapStart + ((uintptr_t)SrcData->BitmapPtr - BitmapDelta);
230+
const char *SrcBitmap = ptr_add_with_overflow(
231+
SrcBitmapStart, (uintptr_t)SrcData->BitmapPtr - BitmapDelta);
232232
// BitmapDelta also needs to be decreased as we advance to the next data
233233
// record.
234234
BitmapDelta -= sizeof(*SrcData);

0 commit comments

Comments
 (0)