[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
This commit is contained in:
Martin Storsjö 2021-08-06 09:19:25 +03:00
parent aefdce8b39
commit 743f78ef7f
1 changed files with 1 additions and 1 deletions

View File

@ -286,7 +286,7 @@ lprofWriteDataImpl(ProfDataWriter *Writer, const __llvm_profile_data *DataBegin,
/* On WIN64, label differences are truncated 32-bit values. Truncate
* CountersDelta to match. */
#ifdef _WIN64
Header.CountersDelta = (void *)(uint32_t)Header.CountersDelta;
Header.CountersDelta = (uint32_t)Header.CountersDelta;
#endif
/* Write the profile header. */