Skip to content

Commit 743f78e

Browse files
committed
[InstrProfiling] Fix warnings when building for Windows
The Headers.CountersDelta field is an uint64_t, not a pointer, so just cast to uint32_t to truncate it. Differential Revision: https://reviews.llvm.org/D107619
1 parent aefdce8 commit 743f78e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler-rt/lib/profile/InstrProfilingWriter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ lprofWriteDataImpl(ProfDataWriter *Writer, const __llvm_profile_data *DataBegin,
286286
/* On WIN64, label differences are truncated 32-bit values. Truncate
287287
* CountersDelta to match. */
288288
#ifdef _WIN64
289-
Header.CountersDelta = (void *)(uint32_t)Header.CountersDelta;
289+
Header.CountersDelta = (uint32_t)Header.CountersDelta;
290290
#endif
291291

292292
/* Write the profile header. */

0 commit comments

Comments
 (0)